public function toCmsRequest(Request $request)
    {

        $cmsRequest = (new CmsRequest)->duplicate(

            $request->query->all(), $request->request->all(), $request->attributes->all(),

            $request->cookies->all(), $request->files->all(), $request->server->all()
        );

        $cmsRequest->headers = clone $request->headers;

        return $cmsRequest;

    }
public function toCmsRequest(Request $request)
    {

        $cmsRequest = (new CmsRequest)->duplicate(

            $request->query->all(), $request->request->all(), $request->attributes->all(),

            $request->cookies->all(), $request->files->all(), $request->server->all()
        );

        $cmsRequest->headers = clone $request->headers;

        return $cmsRequest;

    }
public function toCmsRequest ( Request $ request ) { $ cmsRequest = ( new CmsRequest ) -> duplicate ( $ request -> query -> all ( ) , $ request -> request -> all ( ) , $ request -> attributes -> all ( ) , $ request -> cookies -> all ( ) , $ request -> files -> all ( ) , $ request -> server -> all ( ) ) ; $ cmsRequest -> headers = clone $ request -> headers ; return $ cmsRequest ; }
Creates a CmsRequest out of an Illuminate Request

@param \Illuminate\Http\Request $request
@return \Cmsable\Http\CmsRequest
Creates a CmsRequest out of an Illuminate Request