getTable(), 'type'); } catch (\Throwable) { static::$typeColumnExists = false; } return static::$typeColumnExists; } /** @return array */ public static function adminSelectColumns(): array { $cols = ['id', 'title_fa', 'key', 'value', 'description', 'is_active']; if (static::hasTypeColumn()) { $cols[] = 'type'; } return $cols; } protected $fillable = [ 'key', 'title_fa', 'is_active', 'description', 'value', 'value_json', 'type', ]; protected $casts = [ 'value_json'=>'array', 'is_active'=>'boolean', ]; }