where('type', $type); } public function user($user){ return $this->where('user_id', $user); } }