Unverified Commit 4918636b authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #173 from indranshastri/develop

Correcting the validation function
parents 05063bc4 cdee184d
...@@ -185,21 +185,10 @@ class APIController extends Controller ...@@ -185,21 +185,10 @@ class APIController extends Controller
* *
* @return mix * @return mix
*/ */
// public function throwValidation($message)
// {
// return $this->setStatusCode(422)
// ->respondWithError($message);
// }
/**
* Throw Validation.
*
* @param string $message
*
* @return mix
*/
public function throwValidation($message) public function throwValidation($message)
{ {
return ['error'=> $message]; return $this->setStatusCode(422)
->respondWithError($message);
} }
} }
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