Tag Archives: Eloquent

Laravel: Get the query builder instance directly from model

Use the static query() method of abstract class Illuminate\Database\Eloquen\Model.

That’s it. Now, you can use methods like where(), find(), delete(), update(), etc.

Thanks