swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.03k stars 388 forks source link

convert request to lumen request on lumen application #522

Closed edricwilliem closed 2 years ago

edricwilliem commented 2 years ago

fix issue when accessing property of $request in lumen application

step to reproduce : create a simple controller

public function simpleAPI(Request $request)
{
    return response()->json([ 'data'  =>  $request->myproperty  ]);
}

expected :

{ 'data' : null }

got :

Symfony Exception :

Call to a member function parameter() on arrayCall to a member function parameter() on array on vendor/illuminate/http/Request.php (line 568)