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