Laravel: Get the query builder instance directly from model

By | March 1, 2018

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 :)

Leave a Reply

Your email address will not be published. Required fields are marked *