group(function () { Route::get('events/form/{element}', 'EventsAPIController@form'); Route::resource('events', 'EventsAPIController'); }); // Public routes for events Route::get('events/', 'EventsPublicController@index'); Route::get('events/{slug?}', 'EventsPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for events Route::prefix('{guard}/event')->group(function () { Route::get('events/form/{element}', 'EventsAPIController@form'); Route::apiResource('events', 'EventsAPIController'); }); // Public routes for events Route::get('event/Events', 'EventsPublicController@getEvents'); } ); }