group(function () { Route::resource('customer', 'CustomerResourceController'); }); 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', 'CustomerResourceController'); }); // Public routes for pages Route::get('customers/', 'CustomerPublicController@index'); Route::get('customers/{slug?}', 'CustomerPublicController@show'); } ); }