Issues (378)

app/Models/BookInfo.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Laravel\Scout\Searchable;
7
8
/**
9
 * App\Models\BookInfo.
10
 *
11
 * @property int $id
12
 * @property string $title
13
 * @property string $author
14
 * @property string|null $asin
15
 * @property string|null $isbn
16
 * @property string|null $ean
17
 * @property string|null $url
18
 * @property int|null $salesrank
19
 * @property string|null $publisher
20
 * @property string|null $publishdate
21
 * @property string|null $pages
22
 * @property string|null $overview
23
 * @property string $genre
24
 * @property bool $cover
25
 * @property \Carbon\Carbon|null $created_at
26
 * @property \Carbon\Carbon|null $updated_at
27
 *
28
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereAsin($value)
29
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereAuthor($value)
30
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereCover($value)
31
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereCreatedAt($value)
32
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereEan($value)
33
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereGenre($value)
34
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereId($value)
35
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereIsbn($value)
36
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereOverview($value)
37
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo wherePages($value)
38
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo wherePublishdate($value)
39
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo wherePublisher($value)
40
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereSalesrank($value)
41
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereTitle($value)
42
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereUpdatedAt($value)
43
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo whereUrl($value)
44
 *
45
 * @mixin \Eloquent
46
 *
47
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo newModelQuery()
48
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo newQuery()
49
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookInfo query()
50
 */
51
class BookInfo extends Model
52
{
53
    use Searchable;
0 ignored issues
show
The trait Laravel\Scout\Searchable requires the property $queryCallback which is not provided by App\Models\BookInfo.
Loading history...
54
55
    /**
56
     * @var string
57
     */
58
    protected $table = 'bookinfo';
59
60
    /**
61
     * @var bool
62
     */
63
    protected $dateFormat = false;
64
65
    /**
66
     * @var array
67
     */
68
    protected $guarded = [];
69
70
    public function searchableAs(): string
71
    {
72
        return 'ix_bookinfo_author_title_ft';
73
    }
74
75
    public function toSearchableArray(): array
76
    {
77
        return [
78
            'author' => $this->author,
79
            'title' => $this->title,
80
        ];
81
    }
82
}
83