无法在 google 云上的 laravel 中加载 CSS 和 JS link

Unable to load the CSS and JS link in laravel on google cloud

我只是在 google 云上部署了我的 laravel 项目,但是 CSS 和 JS 不工作。

这是我的 app.yml

runtime: php73

handlers:
    - url: /public/assets
      static_dir: assets

env_variables:
    ## Put production environment variables here.
    APP_KEY: Already Get this from .env
    APP_STORAGE: /tmp
    VIEW_COMPILED_PATH: /tmp
    SESSION_DRIVER: cookie

你们中的任何一个都可以帮助我让它工作

这是我的 head.php 文件中的 link

<link rel="stylesheet" href="{{ asset('assets') }}/css/bootstrap.css">

你可能把这些弄反了。而不是:

handlers:
  - url: /public/assets
    static_dir: assets

不应该是:

handlers:
  - url: /assets
    static_dir: public/assets

因为你打的url没有/public。我需要查看您的目录树才能确定。