vendredi 1 avril 2016

Laravel redirect route and response json

How can I return a redirect routes with inputs etc. with a json response using laravel 5.1.

My current return looks like this:

return redirect()->route('root')->with('message', 'Success')->withInput();

and here is a sample json response from the docs:

return response()->json(['name' => 'Abigail', 'state' => 'CA']);

But I do not know how to put them together so to say.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire