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 contacts Route::prefix('{guard}/contact')->group(function () { Route::get('accounts/form/{element}', 'AccountsAPIController@form'); Route::apiResource('accounts', 'AccountsAPIController'); }); // Public routes for contacts Route::get('contact/Accounts', 'AccountsPublicController@getAccounts'); } ); }