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
700bf9c3
Unverified
Commit
700bf9c3
authored
Dec 19, 2017
by
Viral Solani
Committed by
GitHub
Dec 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #93 from viralsolani/analysis-qJ77eE
Apply fixes from StyleCI
parents
e8205936
be0ebd29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
30 deletions
+26
-30
UserController.php
app/Http/Controllers/Backend/Access/User/UserController.php
+0
-1
StoreUserRequest.php
app/Http/Requests/Backend/Access/User/StoreUserRequest.php
+6
-6
UpdateUserRequest.php
app/Http/Requests/Backend/Access/User/UpdateUserRequest.php
+5
-5
UserRepository.php
app/Repositories/Backend/Access/User/UserRepository.php
+15
-18
No files found.
app/Http/Controllers/Backend/Access/User/UserController.php
View file @
700bf9c3
...
...
@@ -97,7 +97,6 @@ class UserController extends Controller
$permissions
=
Permission
::
getSelectData
(
'display_name'
);
$userPermissions
=
$user
->
permissions
()
->
get
()
->
pluck
(
'id'
)
->
toArray
();
return
view
(
'backend.access.users.edit'
)
->
with
([
'user'
=>
$user
,
'userRoles'
=>
$user
->
roles
->
pluck
(
'id'
)
->
all
(),
...
...
app/Http/Requests/Backend/Access/User/StoreUserRequest.php
View file @
700bf9c3
...
...
@@ -28,12 +28,12 @@ class StoreUserRequest extends Request
public
function
rules
()
{
return
[
'first_name'
=>
'required|max:255'
,
'last_name'
=>
'required|max:255'
,
'email'
=>
[
'required'
,
'email'
,
'max:255'
,
Rule
::
unique
(
'users'
)],
'password'
=>
'required|min:6|confirmed'
,
'first_name'
=>
'required|max:255'
,
'last_name'
=>
'required|max:255'
,
'email'
=>
[
'required'
,
'email'
,
'max:255'
,
Rule
::
unique
(
'users'
)],
'password'
=>
'required|min:6|confirmed'
,
'assignees_roles'
=>
'required'
,
'permissions'
=>
'required'
,
'permissions'
=>
'required'
,
];
}
...
...
@@ -45,7 +45,7 @@ class StoreUserRequest extends Request
public
function
messages
()
{
return
[
'assignees_roles'
=>
'Please Select Role'
'assignees_roles'
=>
'Please Select Role'
,
];
}
}
app/Http/Requests/Backend/Access/User/UpdateUserRequest.php
View file @
700bf9c3
...
...
@@ -27,10 +27,10 @@ class UpdateUserRequest extends Request
public
function
rules
()
{
return
[
'email'
=>
'required|email'
,
'first_name'
=>
'required'
,
'last_name'
=>
'required'
,
'permissions'
=>
'required'
,
'email'
=>
'required|email'
,
'first_name'
=>
'required'
,
'last_name'
=>
'required'
,
'permissions'
=>
'required'
,
'assignees_roles'
=>
'required'
,
];
}
...
...
@@ -43,7 +43,7 @@ class UpdateUserRequest extends Request
public
function
messages
()
{
return
[
'assignees_roles'
=>
'Please Select Role'
'assignees_roles'
=>
'Please Select Role'
,
];
}
}
app/Repositories/Backend/Access/User/UserRepository.php
View file @
700bf9c3
...
...
@@ -2,21 +2,21 @@
namespace
App\Repositories\Backend\Access\User
;
use
App\Models\Access\User\User
;
use
Illuminate\Support\Facades\DB
;
use
App\Exceptions\GeneralException
;
use
App\Repositories\BaseRepository
;
use
Illuminate\Support\Facades\Hash
;
use
App\Events\Backend\Access\User\UserCreated
;
use
App\Events\Backend\Access\User\UserDeleted
;
use
App\Events\Backend\Access\User\UserUpdated
;
use
App\Events\Backend\Access\User\UserRestored
;
use
App\Events\Backend\Access\User\UserDeactivated
;
use
App\Events\Backend\Access\User\User
Reactiva
ted
;
use
App\Events\Backend\Access\User\User
Dele
ted
;
use
App\Events\Backend\Access\User\UserPasswordChanged
;
use
App\Repositories\Backend\Access\Role\RoleRepository
;
use
App\Events\Backend\Access\User\UserPermanentlyDeleted
;
use
App\Events\Backend\Access\User\UserReactivated
;
use
App\Events\Backend\Access\User\UserRestored
;
use
App\Events\Backend\Access\User\UserUpdated
;
use
App\Exceptions\GeneralException
;
use
App\Models\Access\User\User
;
use
App\Notifications\Frontend\Auth\UserNeedsConfirmation
;
use
App\Repositories\Backend\Access\Role\RoleRepository
;
use
App\Repositories\BaseRepository
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Hash
;
/**
* Class UserRepository.
...
...
@@ -110,10 +110,9 @@ class UserRepository extends BaseRepository
//Attach new roles
$user
->
attachRoles
(
$roles
);
// Attach New Permissions
// Attach New Permissions
$user
->
attachPermissions
(
$permissions
);
//Send confirmation email if requested and account approval is off
if
(
isset
(
$data
[
'confirmation_email'
])
&&
$user
->
confirmed
==
0
)
{
$user
->
notify
(
new
UserNeedsConfirmation
(
$user
->
confirmation_code
));
...
...
@@ -125,13 +124,11 @@ class UserRepository extends BaseRepository
$email_type = 1;
}*/
// Send email to the user
/* $options = [
'data' => $user->toArray(),
'email_template_type' => $email_type,
];*/
/* $options = [
'data' => $user->toArray(),
'email_template_type' => $email_type,
];*/
//createNotification('', 1, 2, $options);
...
...
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