public function store(array $attributes)
    {
        $model = $this->make([]);

        $this->validate($attributes, 'store');

        $this->fill($model, $attributes);

        $this->publish('storing', $model, $attributes);
        $this->save($model);
        $this->publish('stored', $model, $attributes);

        return $model;
    }
public function store(array $attributes)
    {
        $model = $this->make([]);

        $this->validate($attributes, 'store');

        $this->fill($model, $attributes);

        $this->publish('storing', $model, $attributes);
        $this->save($model);
        $this->publish('stored', $model, $attributes);

        return $model;
    }
public function store ( array $ attributes ) { $ model = $ this -> make ( [ ] ) ; $ this -> validate ( $ attributes , 'store' ) ; $ this -> fill ( $ model , $ attributes ) ; $ this -> publish ( 'storing' , $ model , $ attributes ) ; $ this -> save ( $ model ) ; $ this -> publish ( 'stored' , $ model , $ attributes ) ; return $ model ; }
Create a new model by the given attributes and persist
it.

@param array $attributes

@return \Ems\Contracts\Core\Identifiable The created resource
Create a new model by the given attributes and persist it .