【问题标题】:view included in all files having bootstrap files path not working in diffrent route包含在所有具有引导文件路径的文件中的视图在不同的路径中不起作用
【发布时间】:2020-02-16 21:27:43
【问题描述】:

Route::get('fullDetail/{productId}','productController@showSingleProduct');

http://localhost/laravel-ecommerce1/fullDetail/233

包含引导文件路径更改的文件

http://localhost/laravel-ecommerce1/bootstrap.min.css

http://localhost/laravel-ecommerce1/fullDetail/bootstrap.min.css

【问题讨论】:

    标签: laravel file url routes include


    【解决方案1】:

    将此添加到您的刀片模板中

    <base href="/laravel-ecommerce1">
    <link rel="stylesheet" href="/bootstrap.min.css">
    

    资产是相对链接的,/ 表示从根链接

    【讨论】:

      猜你喜欢
      • 2022-10-05
      • 2013-05-21
      • 2018-04-06
      • 2013-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-05
      相关资源
      最近更新 更多