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
c8ae33a0
Unverified
Commit
c8ae33a0
authored
Nov 26, 2017
by
Viral Solani
Committed by
GitHub
Nov 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #46 from viralsolani/analysis-XNJkOL
Apply fixes from StyleCI
parents
7ba1e24f
918db7cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
UserController.php
app/Http/Controllers/Backend/Access/User/UserController.php
+12
-13
BaseModel.php
app/Models/BaseModel.php
+2
-2
UserRepository.php
app/Repositories/Backend/Access/User/UserRepository.php
+1
-1
No files found.
app/Http/Controllers/Backend/Access/User/UserController.php
View file @
c8ae33a0
...
...
@@ -2,19 +2,18 @@
namespace
App\Http\Controllers\Backend\Access\User
;
use
App\Models\Access\User\User
;
use
Illuminate\Support\Facades\DB
;
use
App\Http\Controllers\Controller
;
use
App\Models\Access\Permission\Permission
;
use
App\Repositories\Backend\Access\Role\RoleRepository
;
use
App\Repositories\Backend\Access\User\UserRepository
;
use
App\Http\Requests\Backend\Access\User\EditUserRequest
;
use
App\Http\Requests\Backend\Access\User\ShowUserRequest
;
use
App\Http\Requests\Backend\Access\User\StoreUserRequest
;
use
App\Http\Requests\Backend\Access\User\CreateUserRequest
;
use
App\Http\Requests\Backend\Access\User\DeleteUserRequest
;
use
App\Http\Requests\Backend\Access\User\EditUserRequest
;
use
App\Http\Requests\Backend\Access\User\ManageUserRequest
;
use
App\Http\Requests\Backend\Access\User\ShowUserRequest
;
use
App\Http\Requests\Backend\Access\User\StoreUserRequest
;
use
App\Http\Requests\Backend\Access\User\UpdateUserRequest
;
use
App\Models\Access\Permission\Permission
;
use
App\Models\Access\User\User
;
use
App\Repositories\Backend\Access\Role\RoleRepository
;
use
App\Repositories\Backend\Access\User\UserRepository
;
/**
* Class UserController.
...
...
@@ -99,11 +98,11 @@ class UserController extends Controller
$userPermissions
=
$user
->
permissions
()
->
get
()
->
pluck
(
'id'
)
->
toArray
();
return
view
(
'backend.access.users.edit'
)
->
with
([
'user'
=>
$user
,
'userRoles'
=>
$user
->
roles
->
pluck
(
'id'
)
->
all
(),
'roles'
=>
$this
->
roles
->
getAll
(),
'userPermissions'
=>
$userPermissions
,
'permissions'
=>
$permissions
'user'
=>
$user
,
'userRoles'
=>
$user
->
roles
->
pluck
(
'id'
)
->
all
(),
'roles'
=>
$this
->
roles
->
getAll
(),
'userPermissions'
=>
$userPermissions
,
'permissions'
=>
$permissions
,
]);
}
...
...
app/Models/BaseModel.php
View file @
c8ae33a0
...
...
@@ -28,7 +28,7 @@ class BaseModel extends Model
*
* @return array
*/
public
static
function
getItems
(
$collection
,
$field_name
)
public
static
function
getItems
(
$collection
,
$field_name
)
{
$items
=
[];
...
...
@@ -41,7 +41,7 @@ class BaseModel extends Model
}
foreach
(
$items
as
$id
=>
$item
)
{
$items
[
$item
[
'id'
]]
=
$item
[
'name'
];
$items
[
$item
[
'id'
]]
=
$item
[
'name'
];
}
return
$items
;
...
...
app/Repositories/Backend/Access/User/UserRepository.php
View file @
c8ae33a0
...
...
@@ -43,7 +43,7 @@ class UserRepository extends BaseRepository
public
function
__construct
(
User
$model
,
RoleRepository
$role
)
{
$this
->
model
=
$model
;
$this
->
role
=
$role
;
$this
->
role
=
$role
;
}
/**
...
...
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