group(function () { Route::get('icon/form/{element}', 'IconAPIController@form'); Route::resource('icon', 'IconAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for icons Route::prefix('{guard}/icon')->group(function () { Route::get('icon/form/{element}', 'IconAPIController@form'); Route::apiResource('icon', 'IconAPIController'); }); // Public routes for icons Route::get('icon/Icon', 'IconPublicController@getIcon'); } ); }