first commit

This commit is contained in:
2025-09-13 17:39:17 +03:00
commit e650f3c1b2
73 changed files with 14164 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Book extends Model
{
protected $fillable = [
'title',
'slug',
'author',
'cover_image',
'publication_date',
'description',
'category_id',
];
/**
* Get the category that owns the book.
*/
public function category()
{
return $this->belongsTo(Category::class);
}
/**
* Get the summary associated with the book.
*/
public function summary()
{
return $this->hasOne(Summary::class);
}
}