some progress
This commit is contained in:
@@ -45,4 +45,20 @@ class User extends Authenticatable
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Books saved by the user in their readlist.
|
||||
*/
|
||||
public function readlistBooks()
|
||||
{
|
||||
return $this->belongsToMany(Book::class, 'readlist_items')->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reviews authored by the user.
|
||||
*/
|
||||
public function reviews()
|
||||
{
|
||||
return $this->hasMany(SummaryReview::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user