response::error($message = 'Something went wrong', $code = 400, $data = array())
Returns an error response
-
$message (mixed)
Either a message string or an error or errors object -
$code (mixed)
-
$data (mixed)
-
return (object)