how to change the color of row or column in backpack dashboard?

1.7k views Asked by At

This is my client admin panel

What i want to do know when the expire month comes that column will become red automatically otherwise it stay green.

1

There are 1 answers

2
wahdan On BEST ANSWER

in your view

@php
    $currentdate=strtotime(date('Y/m/d'));
    $exp_date=strtotime($expiry_date);

       if($currentdate > $exp_date)
       { //not expired 
         $color="#539E05";
       }
       else
       {
          //expired 
         $color="#EA2C12";
       }
@endphp
  <td style="color: {{$color}}">{{$expiry_date}}</td>

i don't know your html structure looks like so i assumed that expiry date exist in span tag