forked from eatvio/eatvio-infra
04 10 2023 snapshot
This commit is contained in:
@@ -35,7 +35,15 @@ class Recipe extends Model implements Viewable
|
||||
|
||||
public function author()
|
||||
{
|
||||
return $this->hasOneThrough(User::class, RecipeAuthor::class, 'recipe_id', 'id', 'id', 'user_id');
|
||||
return $this
|
||||
->hasOneThrough(User::class, RecipeAuthor::class, 'recipe_id', 'id', 'id', 'user_id')
|
||||
->withDefault(
|
||||
[
|
||||
'name' => 'Guest Author',
|
||||
'id' => 0,
|
||||
'profile_photo_url' => 'https://dev2.eatvio.com/storage/profile-photos/mW87tqy9P8O31Dauyvg8f7GowMNMsgt9J6u47T7S.jpg'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function comments()
|
||||
|
||||
Reference in New Issue
Block a user