group(function () { Route::get('category/form/{element}', 'CategoryAPIController@form'); Route::resource('category', 'CategoryAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for categories Route::prefix('{guard}/category')->group(function () { Route::get('category/form/{element}', 'CategoryAPIController@form'); Route::apiResource('category', 'CategoryAPIController'); }); // Public routes for categories Route::get('category/Category', 'CategoryPublicController@getCategory'); } ); }