sarga/packages/Webkul/Attribute/src/Models/AttributeOption.php

25 lines
643 B
PHP
Raw Normal View History

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-11 05:41:27 +00:00
use Dimsav\Translatable\Translatable;
2018-07-17 13:28:34 +00:00
use Webkul\Attribute\Models\Attribute;
2019-02-18 07:30:40 +00:00
use Webkul\Attribute\Contracts\AttributeOption as AttributeOptionContract;
2018-07-11 05:41:27 +00:00
2019-02-18 07:30:40 +00:00
class AttributeOption extends TranslatableModel implements AttributeOptionContract
2018-07-11 05:41:27 +00:00
{
2018-07-17 13:28:34 +00:00
public $timestamps = false;
2018-07-11 05:41:27 +00:00
public $translatedAttributes = ['label'];
2018-07-17 13:28:34 +00:00
2018-08-09 04:35:13 +00:00
protected $fillable = ['admin_name', 'sort_order'];
2018-07-17 13:28:34 +00:00
/**
* Get the attribute that owns the attribute option.
*/
public function attribute()
{
return $this->model()->getCustomAttributesAttribute();
2018-07-17 13:28:34 +00:00
}
2018-07-11 05:41:27 +00:00
}