Php 在laravel 5.1应用程序中看不到的资产

Php 在laravel 5.1应用程序中看不到的资产,php,css,.htaccess,laravel,laravel-5.1,Php,Css,.htaccess,Laravel,Laravel 5.1,我使用scotchbox并将我的应用程序设置为: app-response-tracker/ AppResponseTracker/ app/ ... public/ css/ app.css js/ all.js resources/ assets/ views/ ... public/ .htaccess/ favicon.ico index

我使用scotchbox并将我的应用程序设置为:

app-response-tracker/
  AppResponseTracker/
    app/
    ...
    public/
      css/
        app.css
      js/
        all.js
    resources/
      assets/
      views/
    ...
  public/
    .htaccess/
    favicon.ico
    index.php
    robots.txt
在my layouts.main中,我有以下html:

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="App Response Tracker allows you to track the response of applications
    and monitor error output by connecting to a secure end point.">
    <meta name="author" content="Adam Balan">

    <link rel="icon" href="../../favicon.ico">

    <title>App Response Tracker</title>

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

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

站点加载良好,样式根本不加载。如何解决此问题?

默认情况下,帮助器函数的
asset()
helper指向公用文件夹。由于您已将资产添加到应用程序文件夹中的公用文件夹中,因此必须使用
app\u path()
helper函数,但这似乎不是一个好主意。这将反映html源代码中应用程序文件夹的整个路径。只需将您的资产移动到公用文件夹即可。默认情况下,
asset()
helper函数指向公用文件夹。由于您已将资产添加到应用程序文件夹中的公用文件夹中,因此必须使用
app\u path()
helper函数,但这似乎不是一个好主意。这将反映html源代码中应用程序文件夹的整个路径。只需将您的资产移动到公用文件夹,您就可以开始了。
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]