Commit cdee184d authored by cygnet's avatar cygnet

changes for correcting the throwValidation function

parent 1ef52ca7
...@@ -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