return json_encode(array(
'messages' => array(
'username' => $validator->messages()->first('username'),
'email' => $validator->messages()->first('email'),
'password' => $validator->messages()->first('password'),
)
));
return json_encode(array(
'messages' => array(
'username' => $validator->messages()->first('username'),
'email' => $validator->messages()->first('email'),
'password' => $validator->messages()->first('password'),
)
));