I want to input data to database. I am using Laravel 5. When I clicked the submit button. I got an error like the image below. Here is controller:
`
public function tambahjenissurat(Request $request)
{ $this->validate($request, [
'jenis_surat' => 'required'
]);
$jenis_surat = $request['jenis_surat'];
$jenis_surat = new JenisSurat();
$jenis_surat->jenis_surat = $jenis_surat;
$jenis_surat->save();
return redirect()->route('jenissurat');
}`
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire