【问题标题】:Image not found or type unknown dompdf laravel图片未找到或类型未知 dompdf laravel
【发布时间】:2021-03-04 08:46:05
【问题描述】:

view in pdf

我尝试在几天内解决此问题,但找不到解决方案。我的图片没有显示在 pdf 中。请帮帮我。这是控制器中的代码。 controller 这个代码在视图中 in view

【问题讨论】:

    标签: laravel dompdf


    【解决方案1】:

    @Nurul Hidayah 尝试以下操作

    //run the following command in terminal 
    php artisan storage:link
    
    // set your storage path in side .env
    FILESYSTEM_DRIVER=public
    
    //access you file inside blade file 
    asset('storage/report/qm'.$r->qm)
    

    【讨论】:

    • 我已经听从了你的建议,但仍然没有解决我的问题,我仍然收到错误消息“找不到图像或类型未知”:(
    • 我设置了如下选项: (-- setOptions([ 'tempDir' => public_path(), 'chroot' => public_path('report/qm') ]) .--) 和为我工作,谢谢
    猜你喜欢
    • 2020-03-07
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    • 1970-01-01
    • 2017-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多