vendredi 1 mars 2019

How to get JSON from request Laravel?

I use this method:

public function store(CreateEvent $request)
{
    dd($request->json()->all());

}

My requests is:

{"name":"etegjgjghjghj","date":"2019-03-08"}

Headers:

Accept: application/json, text/plain, */*
Content-Type: application/json
Origin: http://localhost:4200

As response I get blank page in Chrome network without response data.

I tried this:

public function store(CreateEvent $request){ dd('test'); }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire