即使使用相同的模板和扩展,平面图标 img 也不会仅在某些页面中显示

Flat icon img not displaying only in some pages even with the same template and extends

我的这个网站 http://www.portalbrasilonline.com.br/ 运行良好,但直到现在我才意识到有些页面不是 "rendering" 100%,例如您点击顶部菜单 "Por Estados"然后选择一个州(巴西州),您将看到页脚不再显示图像。

奇怪的是,我在所有页面中都使用相同的模板,但其中一些显示图像而另一些不显示。

@extends('layouts.app')
@section('content')
    <p>This is appended to the master sidebar.</p>
@endsection

因为它应该呈现相同的内容,所以我真的不知道该怎么办。建议?

您的图片路径是 relative 而不是 absolute.

在路径前添加 / 以停止此操作。

Laravel 带有许多可用的辅助函数 here。您将从使用中受益的是 asset(),它可以像这样使用:{{ asset('img/image.png') }} 在您的 blade 模板中,它将使用当前方案为您的资产生成 URL请求(HTTP 或 HTTPS)。