group(function () { Route::get('currency/form/{element}', 'CurrencyAPIController@form'); Route::resource('currency', 'CurrencyAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for invents Route::prefix('{guard}/invent')->group(function () { Route::get('currency/form/{element}', 'CurrencyAPIController@form'); Route::apiResource('currency', 'CurrencyAPIController'); }); // Public routes for invents Route::get('invent/Currency', 'CurrencyPublicController@getCurrency'); } ); } // API routes for location Route::prefix('{guard}/invent')->group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::resource('location', 'LocationAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for invents Route::prefix('{guard}/invent')->group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::apiResource('location', 'LocationAPIController'); }); // Public routes for invents Route::get('invent/Location', 'LocationPublicController@getLocation'); } ); } // API routes for tax Route::prefix('{guard}/invent')->group(function () { Route::get('tax/form/{element}', 'TaxAPIController@form'); Route::resource('tax', 'TaxAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for invents Route::prefix('{guard}/invent')->group(function () { Route::get('tax/form/{element}', 'TaxAPIController@form'); Route::apiResource('tax', 'TaxAPIController'); }); // Public routes for invents Route::get('invent/Tax', 'TaxPublicController@getTax'); } ); }