From 88ca164ba5797ca377effe34217f68ee89722dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Mon, 24 Aug 2020 14:16:41 +0200 Subject: [PATCH] Refactor avatar accessor in User model --- app/Models/User.php | 2 +- resources/views/activities/index.blade.php | 2 +- resources/views/layout.blade.php | 2 +- resources/views/settings/profile.blade.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index a0f87c8c..b68afbfe 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -28,7 +28,7 @@ class User extends Authenticatable ]; // Accessors - public function getAvatarAttribute($avatar) + public function getAvatarPathAttribute($avatar) { return $avatar ? '/storage/avatars/' . $avatar : 'https://via.placeholder.com/250'; } diff --git a/resources/views/activities/index.blade.php b/resources/views/activities/index.blade.php index 0b5b13b1..9ab1bd98 100644 --- a/resources/views/activities/index.blade.php +++ b/resources/views/activities/index.blade.php @@ -10,7 +10,7 @@
@if ($activity->user) - + @endif
{{ __('activities.' . $activity->action) }} #{{ $activity->entity_id }}
diff --git a/resources/views/layout.blade.php b/resources/views/layout.blade.php index e75fa64c..8073de4c 100644 --- a/resources/views/layout.blade.php +++ b/resources/views/layout.blade.php @@ -100,7 +100,7 @@
  • - +
    • diff --git a/resources/views/settings/profile.blade.php b/resources/views/settings/profile.blade.php index e33d31ea..90d7961d 100644 --- a/resources/views/settings/profile.blade.php +++ b/resources/views/settings/profile.blade.php @@ -9,7 +9,7 @@
      - + @include('partials.validation_error', ['payload' => 'avatar'])