group(function () { Route::get('viewing/form/{element}', 'ViewingAPIController@form'); Route::resource('viewing', 'ViewingAPIController'); }); // Public routes for viewing Route::get('viewings/', 'ViewingPublicController@index'); Route::get('viewings/{slug?}', 'ViewingPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for viewings Route::prefix('{guard}/viewing')->group(function () { Route::get('viewing/form/{element}', 'ViewingAPIController@form'); Route::apiResource('viewing', 'ViewingAPIController'); }); // Public routes for viewings Route::get('viewing/Viewing', 'ViewingPublicController@getViewing'); } ); }