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
28f87028
Commit
28f87028
authored
Mar 08, 2018
by
cygnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes done for spelling mistake
parent
8c72d8d7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
PagesController.php
app/Http/Controllers/Api/V1/PagesController.php
+3
-3
PermissionController.php
app/Http/Controllers/Api/V1/PermissionController.php
+4
-4
RolesController.php
app/Http/Controllers/Api/V1/RolesController.php
+3
-3
UsersController.php
app/Http/Controllers/Api/V1/UsersController.php
+3
-3
No files found.
app/Http/Controllers/Api/V1/PagesController.php
View file @
28f87028
...
@@ -58,7 +58,7 @@ class PagesController extends APIController
...
@@ -58,7 +58,7 @@ class PagesController extends APIController
*/
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
}
}
...
@@ -76,7 +76,7 @@ class PagesController extends APIController
...
@@ -76,7 +76,7 @@ class PagesController extends APIController
*/
*/
public
function
update
(
Request
$request
,
Page
$page
)
public
function
update
(
Request
$request
,
Page
$page
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
...
@@ -89,7 +89,7 @@ class PagesController extends APIController
...
@@ -89,7 +89,7 @@ class PagesController extends APIController
return
new
PagesResource
(
$page
);
return
new
PagesResource
(
$page
);
}
}
public
function
valiatingRequest
(
Request
$request
)
public
function
vali
d
atingRequest
(
Request
$request
)
{
{
$validation
=
Validator
::
make
(
$request
->
all
(),
[
$validation
=
Validator
::
make
(
$request
->
all
(),
[
...
...
app/Http/Controllers/Api/V1/PermissionController.php
View file @
28f87028
...
@@ -49,7 +49,7 @@ class PermissionController extends APIController
...
@@ -49,7 +49,7 @@ class PermissionController extends APIController
}
}
/**
/**
* Creates the Resour
s
e for Role.
* Creates the Resour
c
e for Role.
*
*
* @param Request $request
* @param Request $request
*
*
...
@@ -57,7 +57,7 @@ class PermissionController extends APIController
...
@@ -57,7 +57,7 @@ class PermissionController extends APIController
*/
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
}
}
...
@@ -76,7 +76,7 @@ class PermissionController extends APIController
...
@@ -76,7 +76,7 @@ class PermissionController extends APIController
*/
*/
public
function
update
(
Request
$request
,
Permission
$permission
)
public
function
update
(
Request
$request
,
Permission
$permission
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
...
@@ -89,7 +89,7 @@ class PermissionController extends APIController
...
@@ -89,7 +89,7 @@ class PermissionController extends APIController
return
new
PermissionResource
(
$permission
);
return
new
PermissionResource
(
$permission
);
}
}
public
function
valiatingRequest
(
Request
$request
)
public
function
vali
d
atingRequest
(
Request
$request
)
{
{
$validation
=
Validator
::
make
(
$request
->
all
(),
[
$validation
=
Validator
::
make
(
$request
->
all
(),
[
'name'
=>
'required|max:191'
,
'name'
=>
'required|max:191'
,
...
...
app/Http/Controllers/Api/V1/RolesController.php
View file @
28f87028
...
@@ -57,7 +57,7 @@ class RolesController extends APIController
...
@@ -57,7 +57,7 @@ class RolesController extends APIController
*/
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
}
}
...
@@ -75,7 +75,7 @@ class RolesController extends APIController
...
@@ -75,7 +75,7 @@ class RolesController extends APIController
*/
*/
public
function
update
(
Request
$request
,
Role
$role
)
public
function
update
(
Request
$request
,
Role
$role
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
...
@@ -88,7 +88,7 @@ class RolesController extends APIController
...
@@ -88,7 +88,7 @@ class RolesController extends APIController
return
new
RoleResource
(
$role
);
return
new
RoleResource
(
$role
);
}
}
public
function
valiatingRequest
(
Request
$request
)
public
function
vali
d
atingRequest
(
Request
$request
)
{
{
$permissions
=
''
;
$permissions
=
''
;
...
...
app/Http/Controllers/Api/V1/UsersController.php
View file @
28f87028
...
@@ -89,7 +89,7 @@ class UsersController extends APIController
...
@@ -89,7 +89,7 @@ class UsersController extends APIController
*/
*/
public
function
update
(
Request
$request
,
User
$user
)
public
function
update
(
Request
$request
,
User
$user
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
,
'edit'
,
$user
->
id
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
,
'edit'
,
$user
->
id
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
...
@@ -107,7 +107,7 @@ class UsersController extends APIController
...
@@ -107,7 +107,7 @@ class UsersController extends APIController
*/
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
$validation
=
$this
->
valiatingRequest
(
$request
);
$validation
=
$this
->
vali
d
atingRequest
(
$request
);
if
(
$validation
->
fails
())
{
if
(
$validation
->
fails
())
{
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
return
$this
->
throwValidation
(
$validation
->
messages
()
->
first
());
...
@@ -120,7 +120,7 @@ class UsersController extends APIController
...
@@ -120,7 +120,7 @@ class UsersController extends APIController
/**
/**
* Validation function to validate user input.
* Validation function to validate user input.
*/
*/
public
function
valiatingRequest
(
Request
$request
,
$string
=
''
,
$id
=
0
)
public
function
vali
d
atingRequest
(
Request
$request
,
$string
=
''
,
$id
=
0
)
{
{
$password
=
(
$string
==
'edit'
)
?
''
:
'required|min:6|confirmed'
;
$password
=
(
$string
==
'edit'
)
?
''
:
'required|min:6|confirmed'
;
$validation
=
Validator
::
make
(
$request
->
all
(),
[
$validation
=
Validator
::
make
(
$request
->
all
(),
[
...
...
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