record update issue...

can some help me $this->record->update(['status', $value]); not working... but $this->record->status = $value; $this->record->save(); working
9 Replies
LeandroFerreira
fillable 🤔 ?
jouni.i
jouni.iOP2y ago
yes protected $fillable = [ 'name', 'email', 'password', 'education', 'status', ];
Andrew Wallo
Andrew Wallo2y ago
$this->record->update(['status' => $this->status]) Maybe If you set the status public property on a component
LeandroFerreira
Can you share the complete code where you are using $this->record->update.. ?
toeknee
toeknee2y ago
because your code is incorrrect, look at the update method you are doing , for a status with it's value you need to push it with => so $this->record->update(['status' => $value]);
jouni.i
jouni.iOP2y ago
hah you are right 🙂 I'm starting to feel like I need to buy glasses
toeknee
toeknee2y ago
Don’t worry, I’ve been there myself 😂
LeandroFerreira
me too!
Want results from more Discord servers?
Add your server