Closed hamedgasemi200 closed 1 year ago
I get Bulk update error while saving whenever toSearchableArray has a boolean record.
Bulk update error
toSearchableArray
public function toSearchableArray(): array { return $this->only([ ... 'comments_status' => true, // Causes to crash ]); }
Solved it by:
protected $casts = [ 'comment_status' => 'boolean', ];
I get
Bulk update error
while saving whenevertoSearchableArray
has a boolean record.