| 1 | <?php |
||
| 9 | class ShopCategory extends ChocolateyModel |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Disable Timestamps |
||
| 13 | * |
||
| 14 | * @var bool |
||
| 15 | */ |
||
| 16 | public $timestamps = false; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The table associated with the model. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $table = 'chocolatey_shop_items_categories'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Primary Key of the Table |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $primaryKey = 'category_name'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * The Appender(s) of the Model |
||
| 34 | * |
||
| 35 | * @var array |
||
| 36 | */ |
||
| 37 | protected $appends = [ |
||
| 38 | 'category', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Store an Shop Country |
||
| 43 | * |
||
| 44 | * @param string $categoryName |
||
| 45 | * @return ShopCategory |
||
| 46 | */ |
||
| 47 | public function store(string $categoryName): ShopCategory |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get Shop Category Name |
||
| 56 | * |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getCategoryAttribute(): string |
||
| 63 | } |
||
| 64 |