Question

When i tried to incude css and js in Laravel 4.1.26 ,it seems path mismach , Iput all the js and css inside

public\css\
public\js\

Here is my blade template files and details

app\views\layouts\master.blade.php

<title>dummy title</title>
@include('includes.css')
@include('includes.js')

app\views\includes\css.blade.php

{{ HTML::style('css/bootstrap.css'); }}
{{ HTML::style('css/css.css'); }}

app\views\includes\js.blade.php

{{ HTML::script('js/script.js'); }}

My problem is am not getting the exact path to css folders ,missing the public folder iin between , can anyone help me to solve this issue. I saw some similar question in stack-overflow but hardly get the solution for this. So seems like a duplicate question but i didn't find a answer for this one?

Thanks in advance.

Was it helpful?

Solution

This question contains the answers you need:

Using CSS in Laravel views?

However there seems to be another issue if you're needing public in your URL to access your site. The public directory should be set as the DocumentRoot and therefore you will not need to refer to that directory in your URL.

OTHER TIPS

try this {{ HTML::style( asset('css/css.css') ) }}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top