public function scopeClosedCases($query) { return $query->where('status', '2')->orderBy('id', 'DESC')->get(); }