a method like delete & update that runs on multiple records? – Laravel
How can I code a method in model that I use it for multiple records like delete or update? User::whereIn('id', [1, 2, 3])->delete(); My method is like this: public function remove() { $this->update([ 'expired_at' => now()->addYear() ]); } But above…