| 1 | <?php |
||
| 14 | class Vendor extends Repository implements SluggableInterface |
||
| 15 | { |
||
| 16 | use LikeableTrait, ActivateableTrait, SluggableTrait, Presenterable, HasImages; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $table = 'vendors'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var VendorPresenter |
||
| 25 | */ |
||
| 26 | protected $presenter = VendorPresenter::class; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $fillable = [ |
||
| 32 | 'name', 'phone', 'description', 'active', 'email', 'slug', 'user_id' |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var array |
||
| 37 | */ |
||
| 38 | protected $sluggable = array( |
||
| 39 | 'build_from' => 'name', |
||
| 40 | 'save_to' => 'slug', |
||
| 41 | ); |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 45 | */ |
||
| 46 | public function user() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough |
||
| 53 | */ |
||
| 54 | public function lots() |
||
| 58 | } |