heroicpixels / filterable

Automatically filter Laravel Eloquent results from URL querystring
MIT License
57 stars 2 forks source link

Extending multiple classes #7

Closed keyurshah closed 9 years ago

keyurshah commented 9 years ago

Great package! I am likely needing my base Eloquent model to extend Filterable and another class together. What would be a good way of doing that?

Was thinking I might need to create separate models for those needing Filterable.

Is there anyway that filterable could be used as a trait?

Thanks!

heroicpixels commented 9 years ago

You could easily transform it into a trait. Or make it a standalone class that wraps a DB or Eloquent object. For an example of the latter see https://gist.github.com/heroicpixels/f70fd94d8d4d5158ba0f.

keyurshah commented 9 years ago

thanks, i'll look over that. appreciate the help!