group(function () { Route::resource('dealer', 'DealerResourceController'); }); // Public routes for dealer Route::get('dealers/', 'DealerPublicController@index'); Route::get('dealers/{slug?}', 'DealerPublicController@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', 'DealerResourceController'); }); // Public routes for pages Route::get('dealers/', 'DealerPublicController@index'); Route::get('dealers/{slug?}', 'DealerPublicController@show'); } ); }