Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
99ac8f95
Commit
99ac8f95
authored
Mar 08, 2018
by
cygnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
5ef62d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
UsersController.php
app/Http/Controllers/Api/V1/UsersController.php
+31
-1
api.php
routes/api.php
+8
-1
No files found.
app/Http/Controllers/Api/V1/UsersController.php
View file @
99ac8f95
...
@@ -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
->
get
Paginated
(
$limit
)
$this
->
repository
->
get
ForDataTable
(
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.
*/
*/
...
...
routes/api.php
View file @
99ac8f95
...
@@ -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'
);
});
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment