Laravel返回值预计为'照亮\ Http \ Response','string'返回

Hi have this function which is returning path of a file.

public function filecreate()
{
    $myHelper = new MyHelper();
    $path = $myHelper->create();

    return $path;
}

phpStorm showing warning of

Return value is expected to be 'illuminate\Http\Response', 'string' returned

You must use Response object in return, something like this with helper:

return response(%path_to_view);

The response() helper may be used to generate other types of response instances. source

To return simple string use:

return response($path)