feat: Multiple Systems

This commit is contained in:
2024-03-18 01:26:54 +01:00
parent 22ea1930c4
commit 12d8f3913c
29 changed files with 2556 additions and 90 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BookRecommendation extends Model
{
protected $table = 'book_recommendations';
protected $fillable = [
'book_name',
'author',
'description',
'isbn',
'pages',
'recommended_by',
'cover_image',
'status',
];
/**
* Get the user that recommended the book.
*/
public function recommender()
{
return $this->belongsTo(User::class, 'recommended_by');
}
public function votes()
{
return $this->hasMany(Vote::class);
}
}