joelbutcher / laravel-archivable

An archivable trait package for Laravel Eloquent models
MIT License
110 stars 19 forks source link

Archiving doesn't trigger default Eloquent events #25

Open Kaylakaze opened 1 month ago

Kaylakaze commented 1 month ago

This seems to be because you're using $query->update($columns) instead of $this->update($columns). Why is your runArchive method so... weird when your unArchive method looks as expected?

Kaylakaze commented 1 month ago

I've rewritten the archive method in my code to make it like the unArchive method in structure, but since I don't understand why you handled the archive and runArchive methods the way that you did, I don't know if I'm missing something.