protected function instanceAndClass($model)
    {

        // Checks without instantiating first
        if (!is_subclass_of($model, Model::class)) {
            throw new UnsupportedParameterException('ModelTypeFactory only supports Eloquent models not '.Type::of($model) );
        }

        return is_object($model) ? [$model, get_class($model)] : [new $model(), $model];
    }
protected function instanceAndClass($model)
    {

        // Checks without instantiating first
        if (!is_subclass_of($model, Model::class)) {
            throw new UnsupportedParameterException('ModelTypeFactory only supports Eloquent models not '.Type::of($model) );
        }

        return is_object($model) ? [$model, get_class($model)] : [new $model(), $model];
    }
protected function instanceAndClass ( $ model ) { // Checks without instantiating first if ( ! is_subclass_of ( $ model , Model :: class ) ) { throw new UnsupportedParameterException ( 'ModelTypeFactory only supports Eloquent models not ' . Type :: of ( $ model ) ) ; } return is_object ( $ model ) ? [ $ model , get_class ( $ model ) ] : [ new $ model ( ) , $ model ] ; }
Return an instance of a model and a classname

@param mixed $model

@return array
Return an instance of a model and a classname