I'm trying to implement a POST in this method:
public function store(Request $request)
{
$veiculo = new Veiculo($request->(['marca', 'modelo', 'ano', 'preco']));
$veiculo->save();
return $this->respondCreated('The veiculo has been created');
}
I'm finding that it's in trouble because it's returning me a 500 error in postman
{
"marca": "Ford",
"modelo": "Fusio",
"ano": 2014,
"preco": 137.985
}