/** * Get user id * * @param $username */ public function getUserID($username) { $user = User::whereUsername($username)->first(); return $user->id; }