group(function () { Route::resource('test', 'TestResourceController'); }); 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', 'TestResourceController'); }); // Public routes for pages Route::get('beejees_lavalites/', 'TestPublicController@index'); Route::get('beejees_lavalites/{slug?}', 'TestPublicController@show'); } ); } // web routes for test Route::prefix('{guard}/beejees_lavalite')->group(function () { Route::resource('test', 'TestResourceController'); }); // Public routes for test Route::get('beejees_lavalites/', 'TestPublicController@index'); Route::get('beejees_lavalites/{slug?}', 'TestPublicController@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', 'TestResourceController'); }); // Public routes for pages Route::get('beejees_lavalites/', 'TestPublicController@index'); Route::get('beejees_lavalites/{slug?}', 'TestPublicController@show'); } ); }