group(function () { Route::resource('viewing', 'ViewingResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'ViewingResourceController'); }); // Public routes for pages Route::get('viewings/', 'ViewingPublicController@index'); Route::get('viewings/{slug?}', 'ViewingPublicController@show'); } ); }