protected function relationResolver($relation)
    {
        $return = ['relation' => '', 'action' => 'update'];

        try {
            list($relation, $action) = explode('@', $relation);
            $return = ['relation' => $relation, 'action' => $action];
        } catch (\Exception $e) {
            $return['relation'] = $relation;
        }

        if (!in_array($return['action'], $this->availableActions)) {
            DB::rollBack(); //Rollback the transaction before throw exception
            throw (new SoftCascadeNonExistentRelationActionException())->setRelation(implode('@', $return));
        }

        return $return;
    }
protected function relationResolver($relation)
    {
        $return = ['relation' => '', 'action' => 'update'];

        try {
            list($relation, $action) = explode('@', $relation);
            $return = ['relation' => $relation, 'action' => $action];
        } catch (\Exception $e) {
            $return['relation'] = $relation;
        }

        if (!in_array($return['action'], $this->availableActions)) {
            DB::rollBack(); //Rollback the transaction before throw exception
            throw (new SoftCascadeNonExistentRelationActionException())->setRelation(implode('@', $return));
        }

        return $return;
    }
protected function relationResolver ( $ relation ) { $ return = [ 'relation' => '' , 'action' => 'update' ] ; try { list ( $ relation , $ action ) = explode ( '@' , $ relation ) ; $ return = [ 'relation' => $ relation , 'action' => $ action ] ; } catch ( \ Exception $ e ) { $ return [ 'relation' ] = $ relation ; } if ( ! in_array ( $ return [ 'action' ] , $ this -> availableActions ) ) { DB :: rollBack ( ) ; //Rollback the transaction before throw exception throw ( new SoftCascadeNonExistentRelationActionException ( ) ) -> setRelation ( implode ( '@' , $ return ) ) ; } return $ return ; }
Resolve relation string.

@param string $relation

@return array
Resolve relation string .