eloquent and css
I am trying to input my image wallpaper link in my .css but it's not working
.timeline-cover{
background: url("../storage/wallpapers/$user->image") no-repeat;
}
You can't use php variable inside .css files, you can do it with add element to your views
<style>
.timeline-cover{
background: url("../storage/wallpapers/$user->image") no-repeat;
}
</style>
// other html code
Or with inline styles like
<div style="background: url("../storage/wallpapers/$user->image") no-repeat;"></div>
Or you can generate .css file with Laravel.
put it as inline style.
<div style="background:url('.../$user->image')"></div>
You can't add php code to external css
What has the question got to do with Eloquent?
@snapey Oh, yeah, of course "can not", I fix it.
Please or to participate in this conversation.