dimanche 24 avril 2016

Laravel json request returning null object

i'm trying to post a json to a route and check if the result sent is right, but i'm getting a null response. Whats wrong?

I'm using rest client, posting with headers csft and content-type.

$dados = $request->json();
return response($dados->all());

They are under web middleware group and i'm logged in when i'm trying to do the request.

{
  "ano" : "2015",
  "curso" : {
    "nome" : "teste",
    "codigo" : "codigo"
  },
  "disciplinas":[
    {

    }
  ],
  "eletivas": [
    {

    }
  ]
}

the result on the response is [].



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire