Sync
This commit is contained in:
@@ -7,18 +7,18 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Kalnoy\Nestedset\NodeTrait;
|
||||
|
||||
/**
|
||||
* Class Category
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $country_locale_id
|
||||
* @property string|null $name
|
||||
* @property string $short_name
|
||||
* @property string $name
|
||||
* @property string|null $emoji
|
||||
* @property string|null $slug
|
||||
* @property string|null $description
|
||||
* @property bool $enabled
|
||||
* @property bool $is_top
|
||||
* @property int $_lft
|
||||
@@ -27,16 +27,14 @@
|
||||
* @property string|null $deleted_at
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property CountryLocale $country_locale
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
use Cachable, SoftDeletes;
|
||||
use NodeTrait, SoftDeletes;
|
||||
|
||||
protected $table = 'categories';
|
||||
|
||||
protected $casts = [
|
||||
'country_locale_id' => 'int',
|
||||
'enabled' => 'bool',
|
||||
'is_top' => 'bool',
|
||||
'_lft' => 'int',
|
||||
@@ -45,10 +43,8 @@ class Category extends Model
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'country_locale_id',
|
||||
'name',
|
||||
'short_name',
|
||||
'emoji',
|
||||
'slug',
|
||||
'description',
|
||||
'enabled',
|
||||
@@ -57,9 +53,4 @@ class Category extends Model
|
||||
'_rgt',
|
||||
'parent_id',
|
||||
];
|
||||
|
||||
public function country_locale()
|
||||
{
|
||||
return $this->belongsTo(CountryLocale::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user