Files
newznab-tmux/app/Models/BookInfo.php
T

47 lines
753 B
PHP

<?php
namespace App\Models;
use App\Support\Database\CacheQueryBuilder;
use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
class BookInfo extends Model
{
use Searchable;
use CacheQueryBuilder;
/**
* @var string
*/
protected $table = 'bookinfo';
/**
* @var bool
*/
protected $dateFormat = false;
/**
* @var array
*/
protected $guarded = [];
/**
* @return string
*/
public function searchableAs()
{
return 'ix_bookinfo_author_title_ft';
}
/**
* @return array
*/
public function toSearchableArray()
{
return [
'author'=> $this->author,
'title' => $this->title,
];
}
}