| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Tests\Fixtures; |
||
| 11 | class AuthorBeginsWithScoped extends Model |
||
| 12 | { |
||
| 13 | use Cachable; |
||
| 14 | |||
| 15 | protected $table = "authors"; |
||
| 16 | protected $casts = [ |
||
| 17 | "finances" => "array", |
||
| 18 | ]; |
||
| 19 | protected $fillable = [ |
||
| 20 | 'name', |
||
| 21 | 'email', |
||
| 22 | "finances", |
||
| 23 | ]; |
||
| 24 | |||
| 25 | protected static function boot() |
||
| 31 | |||
| 32 | public function books() : HasMany |
||
| 36 | |||
| 37 | public function printers() : HasManyThrough |
||
| 41 | |||
| 42 | public function profile() : HasOne |
||
| 46 | |||
| 47 | public function getLatestBookAttribute() |
||
| 54 | |||
| 55 | public function scopeStartsWithA(Builder $query) : Builder |
||
| 59 | |||
| 60 | public function scopeNameStartsWith(Builder $query, string $startOfName) : Builder |
||
| 64 | } |
||
| 65 |