Restore not working?

Restore bulk action looks like it is working, but it doesn't actually update the deleted value. Source diving shows that we are missing the records on the collection code:
$this->action(function (): void {
$this->process(static function (Collection $records): void {
$records->each(function (Model $record): void {
if (! method_exists($record, 'restore')) {

return;
}

$record->restore();
});
});

$this->success();
});
$this->action(function (): void {
$this->process(static function (Collection $records): void {
$records->each(function (Model $record): void {
if (! method_exists($record, 'restore')) {

return;
}

$record->restore();
});
});

$this->success();
});
So at which point are the Collection Records passed in, as somewhere around here is where they are being dropped and I cannot see why.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?