Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
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
Platform
Commits
c137fbd7
Commit
c137fbd7
authored
Sep 23, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting the users
parent
abeac097
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
UserController.php
Http/Controllers/Admin/UserController.php
+16
-1
index.blade.php
Resources/views/admin/index.blade.php
+3
-3
No files found.
Http/Controllers/Admin/UserController.php
View file @
c137fbd7
<?php
namespace
Modules\User\Http\Controllers\Admin
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Illuminate\Support\Facades\View
;
use
Modules\Core\Http\Controllers\Admin\AdminBaseController
;
class
UserController
extends
AdminBaseController
{
/**
* @var \Modules\Session\Entities\User
*/
protected
$users
;
public
function
__construct
()
{
parent
::
__construct
();
$this
->
users
=
Sentinel
::
getUserRepository
();
}
/**
* Display a listing of the resource.
*
...
...
@@ -12,7 +25,9 @@ class UserController extends AdminBaseController
*/
public
function
index
()
{
return
View
::
make
(
'user::admin.index'
);
$users
=
$this
->
users
->
createModel
()
->
paginate
();
return
View
::
make
(
'user::admin.index'
,
compact
(
'users'
));
}
/**
...
...
Resources/views/admin/index.blade.php
View file @
c137fbd7
...
...
@@ -39,18 +39,18 @@
<?php
foreach
(
$users
as
$user
)
:
?>
<tr>
<td>
<a
href=
"{{ URL::route('dashboard.user.edit',
$user->id
) }}"
>
<a
href=
"{{ URL::route('dashboard.user.edit',
[$user->id]
) }}"
>
{{ $user->created_at }}
</a>
</td>
<td>
<a
href=
"{{ URL::route('dashboard.user.edit',
$user->id
) }}"
>
<a
href=
"{{ URL::route('dashboard.user.edit',
[$user->id]
) }}"
>
{{ $user->first_name }}
</a>
</td>
<td>
<div
class=
"btn-group"
>
<a
href=
"{{ URL::route('dashboard.user.edit',
$user->id
) }}"
class=
"btn btn-default btn-flat"
><i
class=
"glyphicon glyphicon-pencil"
></i></a>
<a
href=
"{{ URL::route('dashboard.user.edit',
[$user->id]
) }}"
class=
"btn btn-default btn-flat"
><i
class=
"glyphicon glyphicon-pencil"
></i></a>
<button
class=
"btn btn-danger btn-flat"
data-toggle=
"modal"
data-target=
"#confirmation-{{ $user->id }}"
><i
class=
"glyphicon glyphicon-trash"
></i></button>
</div>
</td>
...
...
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