Reputation: 384
public function updateLecture($id){
$subject = Subject::findOrFail($id);
$subject->name = request('name');
$subject->save();
}
$subjet->description = request('description');
It gives me this error :
'Creating default object from empty value'
and I know for certain that the request('description')
is not empty.
Upvotes: 0
Views: 47
Reputation: 3065
You did spelling mistake,
$subject->description = request('description'); // make subjet to subject
Upvotes: 1