for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
/**
* Class ShopCategory
* @package App\Models
*/
class ShopCategory extends ChocolateyModel
{
* Disable Timestamps
*
* @var bool
public $timestamps = false;
* The table associated with the model.
* @var string
protected $table = 'chocolatey_shop_items_categories';
* Primary Key of the Table
protected $primaryKey = 'category_name';
* The Appender(s) of the Model
* @var array
protected $appends = [
'category',
];
* Store an Shop Country
* @param string $categoryName
* @return ShopCategory
public function store(string $categoryName): ShopCategory
$this->attributes['category_name'] = $categoryName;
return $this;
}
* Get Shop Category Name
* @return string
public function getCategoryAttribute(): string
return $this->attributes['category_name'];