Jim Jim - 1 year ago 263
CSS Question

laravel 5.2 URL background in css

I am using a template in the css there is the line:

background: url('/images/bg.jpg') 50% 0 no-repeat fixed;

How should I do this in Laravel? The css is in the public directory:

<link href="{{URL::to('/style.css" rel="stylesheet')}}">

Answer Source

Checkout out the assert helper function

<link href="{{ asset('style.css') }}" rel="stylesheet">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download