Commit 99ac8f95 authored by cygnet's avatar cygnet

wip

parent 5ef62d36
...@@ -33,7 +33,7 @@ class UsersController extends APIController ...@@ -33,7 +33,7 @@ class UsersController extends APIController
$limit = $request->get('paginate') ? $request->get('paginate') : 25; $limit = $request->get('paginate') ? $request->get('paginate') : 25;
return UserResource::collection( return UserResource::collection(
$this->repository->getPaginated($limit) $this->repository->getForDataTable(1, false)->paginate($limit)
); );
} }
...@@ -53,8 +53,38 @@ class UsersController extends APIController ...@@ -53,8 +53,38 @@ class UsersController extends APIController
return $maindata; return $maindata;
} }
/**
* Return the specified resource.
*
* @param Request
*
* @return \Illuminate\Http\Response
*/
public function deactivatedUserList(Request $request)
{
$limit = $request->get('paginate') ? $request->get('paginate') : 25;
return UserResource::collection(
$this->repository->getForDataTable(0,false)->paginate($limit)
);
}
/**
* Return the specified resource.
*
* @param User $user
*
* @return \Illuminate\Http\Response
*/
public function deleteUserList(Request $request)
{
$limit = $request->get('paginate') ? $request->get('paginate') : 25;
return UserResource::collection(
$this->repository->getForDataTable(0, true)->paginate($limit)
);
}
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*/ */
......
...@@ -29,11 +29,18 @@ Route::group(['namespace' => 'Api\V1', 'prefix' => 'v1', 'as' => 'v1.'], functio ...@@ -29,11 +29,18 @@ Route::group(['namespace' => 'Api\V1', 'prefix' => 'v1', 'as' => 'v1.'], functio
}); });
// Users // Users
Route::group(['prefix' => 'users'], function () {
Route::get('deactiveUsers', 'UsersController@deactivatedUserList');
Route::get('deleteUsers', 'UsersController@deleteUserList');
});
Route::resource('users', 'UsersController'); Route::resource('users', 'UsersController');
// Roles // Roles
Route::resource('roles', 'RolesController'); Route::resource('roles', 'RolesController');
// Permission // Permission
Route::resource('permission', 'PermissionController'); Route::resource('permission', 'PermissionController');
// Page
Route::resource('pages', 'PagesController');
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment