常用的查询可以自定义方法到模型中,要加前缀scope,例如要使用popular方法,则..
public function scopePopular($query){ return $query->where(...); }
这时就可以直接用 模型::popular()->.....