You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
379 B
25 lines
379 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class Book extends SoftDeletesModel
|
|
{
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'other_data' => 'json'
|
|
];
|
|
|
|
/**
|
|
* Get the cover image for the book.
|
|
*/
|
|
public function cover()
|
|
{
|
|
return $this->hasOne(Upload::class, 'id', 'cover_id');
|
|
}
|
|
}
|