public static function fromDataContainer(array $data, Request $request = null)
    {
        $models = collect();
        foreach ($data as $model) {

            $models->push((new RequestModel($request))->data(['data' => $model]));
        }
        return (new static($request))->models($models);
    }
public static function fromDataContainer(array $data, Request $request = null)
    {
        $models = collect();
        foreach ($data as $model) {

            $models->push((new RequestModel($request))->data(['data' => $model]));
        }
        return (new static($request))->models($models);
    }
public static function fromDataContainer ( array $ data , Request $ request = null ) { $ models = collect ( ) ; foreach ( $ data as $ model ) { $ models -> push ( ( new RequestModel ( $ request ) ) -> data ( [ 'data' => $ model ] ) ) ; } return ( new static ( $ request ) ) -> models ( $ models ) ; }
creates instance from data container

@param array $data
@param Request|null $request
@return RequestModelCollection
creates instance from data container