小编roe*_*rjo的帖子

合并请求无效

我试图替换'pic'值,当它进来时设置为数组,带有图像文件名,但合并似乎不起作用.

我没有在日志中使用以下代码获得任何错误.我想我不允许嵌入图片,所以下面有链接.我正在做一个Laravel项目.

Log::info($request);

$image = $request->file('pic');
$imageName = $image->getClientOriginalName();

$request->merge(array('pic' => $imageName));
$request->file('pic')->move(base_path()."/public/profile_pics",$imageName);

Log::info($request);
Run Code Online (Sandbox Code Playgroud)

Laravel Log

有任何想法吗?

php http request laravel

3
推荐指数
1
解决办法
1036
查看次数

标签 统计

http ×1

laravel ×1

php ×1

request ×1