我有一個視圖叫homePage.blade.php
這是我的母版頁,它駐留在res/views/
那個文件中。使用刀片訪問laravel中的公用文件夾
<link rel="stylesheet" href="css/coreStyleSheet.css">
<link rel="stylesheet" href="css/animate.css">
<script src="js/coreScripting.js"></script>
<script src="js/moments.js"></script>
<link rel="stylesheet" href="icons/fontAwesome/css/font-awesome.css"> </head>
一切都很好嗎?
現在我創建一個名爲AppCreate
文件夾誰的路徑是res/views/AppCreate
我有一個刀片文件有現在所謂的something.blade.php
當我使用@extends('homePage')
我不能夠訪問CSS,JS。
我的樹看起來像這樣。
-res -views homePage.blade.php -AppCreate -something.blade.php
我重定向something.blade.php TP公共/管理/ appcreate 我重定向homePage.blade.php公共/ dashBoard。
我希望我解釋得很好。
當我訪問public/admin/appcreate時,laravel無法找到css和js,因爲它是這樣說的。
GET http://localhost/laravel/public/admin/css/coreStyleSheet.css
appcreate:12 GET http://localhost/laravel/public/admin/js/moments.js
appcreate:11 GET http://localhost/laravel/public/admin/js/coreScripting.js
appcreate:13 GET http://localhost/laravel/public/admin/icons/fontAwesome/css/font-awesome.css
保存了一天。謝謝芽:) – Rehan
高興地幫助:) –