【发布时间】:2015-11-06 05:51:16
【问题描述】:
我正在按照 Laracast 教程使用干预处理 image manipulation。将其添加到我的作曲家文件并运行作曲家更新后,我按照installation guide 中的说明将其添加到我的服务提供者和别名中。另外,我正在使用 Vagrant 1.7.4 和一个名为 Scotch Box 2.5 的 Laravel 虚拟盒子。
但是,我无法在我的应用中成功使用干预。这是我的示例路线:
Route::get('foo', function() {
$image = Image::make('http://placehold.it/500x500/000/e8117f');
return Response::make($image->encode('jpg'), 200, ['Content-Type' => 'image/jpeg']);
});
当我在浏览器中访问该页面时,我看到的只是一个损坏的图像图标。我真的很困惑为什么 Chrome 中的开发人员检查器工具会显示:
<img style="-webkit-user-select: none" src="http://192.168.33.10/public/foo">
【问题讨论】:
标签: php image laravel vagrant intervention