Fetch all models with field value of X

Sorry to ask such a basic question but I want to do the following....
I have a model called Work (and a WorkController and WorkRepository). On my Work module there is a field called "available" of type checkbox. Now i want to fetch all models with "available" selected.

  1. What is best practice to implement a e.g. getAllAvailable() method? Is that on the WorkRepository, WorkController of Work model class?
  2. How do I select all the models with that checkbox selected. In the laravel docs I saw this
    $flights = Flight::where('destination', 'Paris')->get();
    but I can't seem to use the where function on my model. E.g. Work::where is not working.
Thanks for any guidance
Was this page helpful?