static function transform($modelOrCollection, $options = [])
    {
        $static = new static($options);

        if ($modelOrCollection instanceof Collection) {
            return $modelOrCollection->map([$static, 'transformModel'])->toArray();
        }

        return $static->transformModel($modelOrCollection);
    }
static function transform($modelOrCollection, $options = [])
    {
        $static = new static($options);

        if ($modelOrCollection instanceof Collection) {
            return $modelOrCollection->map([$static, 'transformModel'])->toArray();
        }

        return $static->transformModel($modelOrCollection);
    }
static function transform ( $ modelOrCollection , $ options = [ ] ) { $ static = new static ( $ options ) ; if ( $ modelOrCollection instanceof Collection ) { return $ modelOrCollection -> map ( [ $ static , 'transformModel' ] ) -> toArray ( ) ; } return $ static -> transformModel ( $ modelOrCollection ) ; }
Transform a Model or a Collection.

@param mixed $modelOrCollection
@param array $options

@return mixed
Transform a Model or a Collection .