mardi 17 janvier 2017

Laravel response function only return 200?

For example:

response()->json(['error' => 'invalid', 401]);
response()->json(['success' => 'success', 200]);

These two ways are all response 200.If I want to return 200 when success,but 401 when error happened.How can I achieve this.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jjnLCw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire