src/Model.php
public function saveOrFail(?array $data = null, ?array $whiteList = null) : void
    {
        $return = parent::save($data, $whiteList);

        if ($return === false) {
            throw new UnableToSaveRecord('Unable to save entity. Details: ' . json_encode($this->getMessages()));
        }
    }
public function saveOrFail(?array $data = null, ?array $whiteList = null) : void
    {
        $return = parent::save($data, $whiteList);

        if ($return === false) {
            throw new UnableToSaveRecord('Unable to save entity. Details: ' . json_encode($this->getMessages()));
        }
    }
public function saveOrFail ( ? array $ data = null , ? array $ whiteList = null ) : void { $ return = parent :: save ( $ data , $ whiteList ) ; if ( $ return === false ) { throw new UnableToSaveRecord ( 'Unable to save entity. Details: ' . json_encode ( $ this -> getMessages ( ) ) ) ; } }
Save the entity or throw an exception.
@param mixed[] $data
@param mixed[] $whiteList
@throws \Frogg\Exception\UnableToSaveRecord
Save the entity or throw an exception .