public function auditCreation()
    {
        if ((!isset($this->auditEnabled) || $this->auditEnabled)) {
            $insert = array_merge([
                'old_value'    => null,
                'author_id'    => auth()->guest() ? null : auth()->user()->id,
                'new_value'    => $this->getAttributes(),
                'related_data' => $this->getRelatedData(),
                'type'         => 'created',], $this->values());

            return $this->audit($insert);
        }
    }
public function auditCreation()
    {
        if ((!isset($this->auditEnabled) || $this->auditEnabled)) {
            $insert = array_merge([
                'old_value'    => null,
                'author_id'    => auth()->guest() ? null : auth()->user()->id,
                'new_value'    => $this->getAttributes(),
                'related_data' => $this->getRelatedData(),
                'type'         => 'created',], $this->values());

            return $this->audit($insert);
        }
    }
public function auditCreation ( ) { if ( ( ! isset ( $ this -> auditEnabled ) || $ this -> auditEnabled ) ) { $ insert = array_merge ( [ 'old_value' => null , 'author_id' => auth ( ) -> guest ( ) ? null : auth ( ) -> user ( ) -> id , 'new_value' => $ this -> getAttributes ( ) , 'related_data' => $ this -> getRelatedData ( ) , 'type' => 'created' , ] , $ this -> values ( ) ) ; return $ this -> audit ( $ insert ) ; } }
Audit creation.
Audit creation .