ContainerFilter.php 416 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\ModelFilters;
  3. use EloquentFilter\ModelFilter;
  4. class ContainerFilter extends ModelFilter
  5. {
  6. /**
  7. * Related Models that have ModelFilters as well as the method on the ModelFilter
  8. * As [relationMethod => [input_key1, input_key2]].
  9. *
  10. * @var array
  11. */
  12. public $relations = [];
  13. public function library($id)
  14. {
  15. return $this->where("library_id", $id);
  16. }
  17. }