Here is my controller
public function update(Request $request)
{
$ids = $request->input('id');
$success_output = '';
$companies = companies::find($ids);
companies::where('id',$ids);
$this->validate($request,
['company_name' => 'required',
'status' => 'required',
]);
$companies->company_name = $request->input('company_name');
$companies->status = $request->input('status');
$companies->save();
$success_output = '<div class="alert alert-success">Data Inserted</div>';
return redirect('/companies')->with('success','updated');
}
where is the problem? in console it returns that the "method save does not exist." couldn't find a solution
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire