سؤال

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.

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top