What is the meaning of Eloquent’s Model::query()?
Any time you’re querying a Model in Eloquent, you’re using the Eloquent Query Builder. Eloquent models pass calls to the query builder using magic methods (__call, __callStatic). Model::query() returns an instance of this query builder. Therefore, since where() and other query calls are passed to the query builder: Model::where()->get(); Is the same as: Model::query()->where()->get(); Where … Read more