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