I have multiple fields store in my database table, and there are followup
field in my database and there are multiple dates store in this field. Now i want count data according to current date. But i am unable to do it.
I am getting same data multiple times, but i want in this format (Suppose there are 5 date store according to today date and they should be count 5, so that i can get the today followup clients )
Please let me know how i can do it.
Here are my controller code..
public function index()
{
$lead=Lead::orderBy('created_at', 'desc')->get()
return view('admin.lead.index',compact('lead'));
}
and here are my view file..
<div class="panel-heading">
@php
$mytime = Carbon\Carbon::now();
$checkdate=$mytime->toDateTimeString();
@endphp
<div class="panel-title">Today Follow Up's:
@foreach($lead as $lws)
<span class="label label-warning">
{{($lws->followup=$checkdate)}}
</span>
@endforeach
</div>
</div>
You can use below code to get only today's follow ups:
or to count the records: