There is already more info in the Laravel Discord https://discord.com/channels/297040613688475649/486650445297877003/1291667060253917185
when I try to update a model with this code
public function toggleRead(int $id): void
{
abort_if($this->user->role !== Role::Student, 401);
$success = ($note = $this->getNotesBuilder()->find($id, ['read']))
->setAttribute('read', !$note->read)
->saveOrFail();
dd($note, $success);
}
it doesn't save to the database (even without the dd,) even though the model shows the updated value and $success = true, I even added an updating callback on my model like this
protected static function booting()
{
static::updated(function (StudentNote $studentNote) {
dump($studentNote);
});
}
but this just shows the note being updated only once, so it's impossible that it gets changed and somehow immediately gets changed back, I have also checked whether the read attribute it in the $fillable array, and yes, it was. So frankly, I think this is a bug with Laravel and/or Livewire, but I have no clue why this happens.