Commit 28f87028 authored by cygnet's avatar cygnet

changes done for spelling mistake

parent 8c72d8d7
...@@ -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->validatingRequest($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->validatingRequest($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 validatingRequest(Request $request)
{ {
$validation = Validator::make($request->all(), [ $validation = Validator::make($request->all(), [
......
...@@ -49,7 +49,7 @@ class PermissionController extends APIController ...@@ -49,7 +49,7 @@ class PermissionController extends APIController
} }
/** /**
* Creates the Resourse for Role. * Creates the Resource 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->validatingRequest($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->validatingRequest($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 validatingRequest(Request $request)
{ {
$validation = Validator::make($request->all(), [ $validation = Validator::make($request->all(), [
'name' => 'required|max:191', 'name' => 'required|max:191',
......
...@@ -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->validatingRequest($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->validatingRequest($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 validatingRequest(Request $request)
{ {
$permissions = ''; $permissions = '';
......
...@@ -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->validatingRequest($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->validatingRequest($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 validatingRequest(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(), [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment