Wednesday, March 15, 2017

how to pass DB values to CSS file in laravel 5.4

Is it possible to pass Table values to style.css file because i want to change Cover image which is background-image dynmicallay?

i tried the following code by Internal Css its worked perfect.. but i want it on External Css .

<style>
    .timeline-cover{
        background: url('<?php if (isset($userinfo[0]['cover'])) { echo url('images/users/'. $userinfo[0]['cover']);} else { echo url('images/cover/1.jpg');}?>') no-repeat;
        background-position: center;
        background-size: cover;
    }
</style>
<div class="timeline-cover"></div>


via Jamal Ahmad

Advertisement