Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinwong90 committed Apr 21, 2018
1 parent 471ba8c commit 34c7134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ResponseMacroServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function boot()

Response::macro('errorValidation', function ($value) {
if(is_array($value))
$response = array_merge(['success'=>0, 'error'=>'Validation Failed'], $value);
$response = array_merge(['success'=>0, 'errors'=>'Validation Failed'], $value);
else
$response = ['success'=>0, 'error'=>$value];
$response = ['success'=>0, 'errors'=>$value];
return response()->json($response, 422);
});
}
Expand Down

0 comments on commit 34c7134

Please sign in to comment.