group(function () { Route::resource('favourite', 'FavouriteResourceController'); }); // Public routes for favourite Route::get('favourites/', 'FavouritePublicController@index'); Route::get('favourite/{slug?}', 'FavouritePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for favourite Route::prefix('{guard}/favourite')->group(function () { Route::resource('favourite', 'FavouriteResourceController'); }); // Public routes for favourite Route::get('favourites/', 'FavouritePublicController@index'); Route::get('favourite/{slug?}', 'FavouritePublicController@show'); } ); }