512, 'height' => 512 ]; /** * Update the user's password * * @var string */ public function updatePassword($oldpass, $newpass) { if (Hash::check($oldpass, $this->password)) { $this->password = Hash::make($newpass); $this->save(); return true; } return false; } /** * Get user profile image * * @var string */ public function profileImage($show_full_path = false, $always_return_path = false) { $site_path = self::$profile_image_dir . $this->id . '-profile.png'; $file_path = base_path() . '/public' . $site_path; if (file_exists($file_path) || $always_return_path) { return $show_full_path ? $file_path : $site_path; } else { return null; } } }