-
Notifications
You must be signed in to change notification settings - Fork 0
Response
Favre Anael edited this page May 17, 2016
·
4 revisions
return $this->response()->success($message = null)
return $this->response()->fail($message = null)
return $this->response()->warning($message = null)
return $this->response()->error($message = null)Set the status of the action (browser : flash a Laracast/Flash message into the session, Ajax : return a status into a JSend response).
return $this->response()->view($view, array $bind = [])Return a view for a browser response
return $this->response()->redirect($url)Return a redirection for a browser response.
return $this->response()->item(Model $model)Format an eloquent model with his Transformer and put it into data offset of a Ajax JSend response.
return $this->response()->collection(Collection $collection)Format an eloquent collection with his Transformer and put it into data offset of a Ajax JSend response.
return $this->response()->datas($datas)Manually specify the data offset content of the Ajax JSend response.
return $this->response()->metas(array $metas)Add metas into the Ajax JSend response.