src/Conductors/Concerns/FindsAndCreatesAbilities.php
protected function getEntityInstance($model)
    {
        if ($model === '*') {
            return '*';
        }

        if ( ! $model instanceof Model) {
            return new $model;
        }

        // Creating an ability for a non-existent model gives the authority that
        // ability on all instances of that model. If the developer passed in
        // a model instance that does not exist, it is probably a mistake.
        if ( ! $model->exists) {
            throw new InvalidArgumentException(
                'The model does not exist. To edit access to all models, use the class name instead'
            );
        }

        return $model;
    }
protected function getEntityInstance($model)
    {
        if ($model === '*') {
            return '*';
        }

        if ( ! $model instanceof Model) {
            return new $model;
        }

        // Creating an ability for a non-existent model gives the authority that
        // ability on all instances of that model. If the developer passed in
        // a model instance that does not exist, it is probably a mistake.
        if ( ! $model->exists) {
            throw new InvalidArgumentException(
                'The model does not exist. To edit access to all models, use the class name instead'
            );
        }

        return $model;
    }
protected function getEntityInstance ( $ model ) { if ( $ model === '*' ) { return '*' ; } if ( ! $ model instanceof Model ) { return new $ model ; } // Creating an ability for a non-existent model gives the authority that // ability on all instances of that model. If the developer passed in // a model instance that does not exist, it is probably a mistake. if ( ! $ model -> exists ) { throw new InvalidArgumentException ( 'The model does not exist. To edit access to all models, use the class name instead' ) ; } return $ model ; }
Get an instance of the given model.

@param  \Illuminate\Database\Eloquent\Model|string  $model
@return \Illuminate\Database\Eloquent\Model|string
Get an instance of the given model .