group(function () { Route::get('user/form/{element}', 'UserAPIController@form'); Route::resource('user', 'UserAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for staffs Route::prefix('{guard}/staff')->group(function () { Route::get('user/form/{element}', 'UserAPIController@form'); Route::apiResource('user', 'UserAPIController'); }); // Public routes for staffs Route::get('staff/User', 'UserPublicController@getUser'); } ); }