spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

Added awesomeness features for Eloquent. #14

Closed kamaroly closed 8 years ago

kamaroly commented 8 years ago

As a big fan of Eloquent, I have done below activities.

  1. Updated migration file and added loggable_id and loggable_type for laravel to accept Morph relationship,
  2. I have added a method called activities in the eloquent trait so that every model that has this trait can have morph relationship with the activities without adding it manually.
  3. I have added all eloquent events.
  4. Event configuration moved to config.
freekmurze commented 8 years ago

Hi, thanks for your contribution.

In your PR there's several things I like (the idea of using the morph relationship), but als things I don't like (coupling with Sentry, switch statements, ...)

As we are currently rebuilding a new version of this component with the features your require, I'm not going to merge this PR.