group(function () { Route::get('customer/form/{element}', 'CustomerAPIController@form'); Route::resource('customer', 'CustomerAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for customers Route::prefix('{guard}/customer')->group(function () { Route::get('customer/form/{element}', 'CustomerAPIController@form'); Route::apiResource('customer', 'CustomerAPIController'); }); // Public routes for customers Route::get('customer/Customer', 'CustomerPublicController@getCustomer'); } ); }