cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

Events when a model is Tagged or Untagged. #95

Closed devguar closed 5 years ago

devguar commented 5 years ago

Events when a model is Tagged or Untagged.

This way we can trigger an event based on 'when' and 'where' a model is tagged or untagged.


Thank you for helping to make this package better!

Please make sure you've read CONTRIBUTING.md before submitting your pull request, and that you have:

Thank you!

cviebrock commented 5 years ago

Two questions:

  1. Do the events need setters for the model and tags? Seems like these should be set in the constructor and nowhere else.

  2. Tests?

Otherwise, this is a great addition!

devguar commented 5 years ago

Two questions:

  1. Do the events need setters for the model and tags? Seems like these should be set in the constructor and nowhere else.
  2. Tests?

Otherwise, this is a great addition!

Yes you are right, we dont need that methods on events. So I removed. About the tests, I ran the same test we already have in the repository, you think we should have new tests for this?

devguar commented 5 years ago

Hey guys, this will be merged into master?

cviebrock commented 5 years ago

Slipped my mind ... merged now. Will tidy things up a bit and push a release shortly. Thanks!

cviebrock commented 5 years ago

Version 3.5.2 includes the events now. Thanks again!

devguar commented 5 years ago

Great! thank you @cviebrock

devguar commented 5 years ago

Hi @cviebrock , Im using laravel 5.7, can I merge this changes (this PL and https://github.com/cviebrock/eloquent-taggable/pull/90) into version 3.4.*?

cviebrock commented 5 years ago

Yes, just make another PR for that please, against the (new) 3.4 branch.