mardi 26 juillet 2016

Laravel 5: Custom abort() message

Using Laravel 5, I want to send a custom abort() message.
For example, if the user doesn't have the required permissions for an action,
I'd like to abort(401, "User can't perform this actions").
Currently, when I do so, the response text is HTML page and not the message.
How can I return only the message?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire