I use scotchbox and have my app set up as such:
app-response-tracker/
AppResponseTracker/
app/
...
public/
css/
app.css
js/
all.js
resources/
assets/
views/
...
public/
.htaccess/
favicon.ico
index.php
robots.txt
In my layouts.main I have the the following 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="http://ift.tt/1xwklwE"></script>
<script src="http://ift.tt/1qIredN"></script>
<![endif]-->
</head>
The line you care about is: <link href="{{asset('css/app.css')}}" rel="stylesheet">
In chrome this resolves too: http://ift.tt/1WpAHDJ
According to the docs:
asset
Generate a URL for an asset.
$url = asset('img/photo.jpg');
My htaccess file looks like:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
The site loads fine, the styles don't load at all. How can I fix this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire