我试图为我的localhost环境启用此库.
http://glide.thephpleague.com/1.0/config/integrations/laravel/
目前的Laravel版本 5.5
gd2 在wamp扩展中启用.
我似乎无法找到问题所在.
路径还可以,图片就在上面.
请参阅以下服务器配置代码.
$server = ServerFactory::create([
'response' => new LaravelResponseFactory(app('request')),
'source' => $source,
//'cache' => new Filesystem(new Adapter('../storage/app/cache/')),
'cache' => $cache,
'cache_path_prefix' => '.cache',
'base_url' => 'transform-img',
]);
Run Code Online (Sandbox Code Playgroud)
现在我用这个
return $server->getImageResponse($path, request()->all());
Run Code Online (Sandbox Code Playgroud)
它没有给出任何错误.
当我dd()这个,我得到这个回应.
StreamedResponse {#1151 ?
#callback: Closure {#1177 ?}
#streamed: false
-headersSent: false
+headers: ResponseHeaderBag {#1176 ?}
#content: null
#version: "1.0"
#statusCode: 200
#statusText: "OK"
#charset: null
}
Run Code Online (Sandbox Code Playgroud)
回调关闭:
#callback: Closure {#1252 ?
class: "League\Glide\Responses\SymfonyResponseFactory"
this: LaravelResponseFactory {#1231 …}
use: …Run Code Online (Sandbox Code Playgroud)