Issue
I have a problem with my laravel project.
In my link.blade.php file I have:
<!-- Bootstrap core CSS -->
<link href="{!! asset(css/bootstrap.min.css) !!}" rel="stylesheet">
<link href="{!! asset(css/theme.css) !!}" rel="stylesheet">
<link href="{!! asset(css/bootstrap-reset.css) !!}" rel="stylesheet">
and when a run my server I got:
Use of undefined constant css - assumed 'css' (View:
/home/ubuntu/workspace/resources/views/partials/links.blade.php) (View:
/home/ubuntu/workspace/resources/views/partials/links.blade.php) (View:
/home/ubuntu/workspace/resources/views/partials/links.blade.php) (View:
/home/ubuntu/workspace/resources/views/partials/links.blade.php)
it's looks like the compiler can't get my css/bootstrap.min.css (located in public dir).
When I've removed this css file it's move to the second one and so on (also js files).
Public dir: Link
What I should do, please help!!
Solution
From your files structure you just need to reference to it directly no need to the asset()
function
It would be like this
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/theme.css" rel="stylesheet">
<link href="/css/bootstrap-reset.css" rel="stylesheet">
Deu certo comigo retirando a função asset
Answered By - Rahmani Seif El Moulouk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.