public function _init($data = array())
 {
     parent::_init($data);
     if (!isset($data['id'])) {
         $this->set_id(0);
     }
 }
 public function store(Request $request)
 {
     $data = $request->all();
     $data['attribute_set_id'] = $this->attributeSet->id->value();
     $behaviorDO = new CreateBehaviorDO($data);
     $behaviorDO->update(array('store_id' => $this->store->id));
     $this->createBehavior->handle($behaviorDO);
     return redirect(route($this->baseRoute . 'index', array('store_id' => $this->store->id->value(), 'attribute_set_id' => $this->attributeSet->id->value())))->with('status', 'Атрибутът е създаден!');
 }