In Laravel you can get all the post data like so:
$request->post();
You can also check if a form has the GET or POST query like so:
$request->has('foo');
However, how do I check if a form has a POST query. Note that I'm aware you can do the following:
$request->post('foo') !== null;
but foo can sometimes be null if the data being posted is JSON. e.g.
{
"foo": null
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire