public static function fromRequest($request = null)
    {
        $request = $request ?: app('request');

        /** @var ParameterBag $data */
        $data = $request->json();

        $dataContainer = $data->get('data', []);
        if (array_has($dataContainer, '0')) {
            return RequestModelCollection::fromDataContainer($dataContainer, $request);
        }

        return (new static($request))->data($data->all());
    }