LaravelDaily/laravel-tips

Restore soft deletes

michail1982 opened this issue · 1 comments

i think right method weel be
Post::onlyTrashed()->where('author_id', 1)->restore();
not
Post::withTrashed()->where('author_id', 1)->restore();

this avoid unnessesary model loading

Thanks @michail1982 nice catch, fixed.