add cover to profile & logout on dashbord
This commit is contained in:
1 parent
a12af09102
commit
c71f3ca4d8
13 files changed
+156
-45
No files matched your search
+8
-2
@@ -67,13 +67,19 @@ class User extends Authenticatable
|
||||
{
|
||||
return $this->morphOne(Image::class, 'imageable')
|
||||
->where('location', 'profile')
|
||||
->orderBy('id', 'desc');
|
||||
->orderBy('id', 'desc')
|
||||
->withDefault(function ($userImage) {
|
||||
$userImage->path = 'images/default-cover.jpg';
|
||||
});
|
||||
}
|
||||
|
||||
public function coverImage(): MorphOne
|
||||
{
|
||||
return $this->morphOne(Image::class, 'imageable')
|
||||
->where('location', 'cover')
|
||||
->orderBy('id', 'desc');
|
||||
->orderBy('id', 'desc')
|
||||
->withDefault(function ($userImage) {
|
||||
$userImage->path = 'images/default-cover.jpg';
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user