2018-07-11 05:41:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\Attribute\Models;
|
|
|
|
|
|
2018-07-24 11:11:32 +00:00
|
|
|
use Webkul\Core\Eloquent\TranslatableModel;
|
2018-07-17 13:28:34 +00:00
|
|
|
use Webkul\Attribute\Models\AttributeOption;
|
2018-07-11 05:41:27 +00:00
|
|
|
|
2018-07-24 11:11:32 +00:00
|
|
|
class Attribute extends TranslatableModel
|
2018-07-11 05:41:27 +00:00
|
|
|
{
|
|
|
|
|
public $translatedAttributes = ['name'];
|
2018-07-17 13:28:34 +00:00
|
|
|
|
2018-07-27 06:22:12 +00:00
|
|
|
protected $fillable = ['code', 'admin_name', 'type', 'position', 'is_required', 'is_unique', 'value_per_locale', 'value_per_channel', 'is_filterable', 'is_configurable'];
|
2018-07-17 13:28:34 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the options.
|
|
|
|
|
*/
|
|
|
|
|
public function options()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(AttributeOption::class);
|
|
|
|
|
}
|
2018-07-11 05:41:27 +00:00
|
|
|
}
|