group(function () { Route::get('accounts/form/{element}', 'AccountsAPIController@form'); Route::resource('accounts', 'AccountsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for accounts Route::prefix('{guard}/account')->group(function () { Route::get('accounts/form/{element}', 'AccountsAPIController@form'); Route::apiResource('accounts', 'AccountsAPIController'); }); // Public routes for accounts Route::get('account/Accounts', 'AccountsPublicController@getAccounts'); } ); }