php – laravel-excel无法使用带有图像的刀片导出xls文件

劳驾,
我想使用laravel-excel导出我的报告.
这是控制器:

public function getExcelfile(){
        $users = UserService::findAllPublic();
        $total = UserService::count();
        $total_with_photo = UserService::countWithPhoto();
        Excel::create('excelfile',function($excel) use ($users,$total,$total_with_photo) {
            $excel->sheet('Excel',function($sheet) use ($users,$total_with_photo) {
                $sheet->loadView('report.excel')->with("users",$users)->with("total",$total)->with("total_with_photo",$total_with_photo);
            });
        })->export('xls');
    }

这是位于报告文件夹的excel.blade.PHP

然后出现此错误

PHPExcel_Exception

File http://myserver.com/projectname/public/assets/images/upload/DSCN1164.jpg not found!

当我尝试在浏览器中访问它时,该文件存在.

最佳答案
代替:

你应该使用:

当然假设它是正确的路径

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些