I need to print only the records for the month of May
I get them with the variable
<td>{{ ($registro->created_at->format('d-m-Y')) }}</td>
I need to see only May results, how do I do it?
Advertisement
Answer
You can use if condition
@if($user->created_at->format('M')=="May") <td>{{ ($registro->created_at->format('d-m-Y')) }}</td> @endif
or
@if($user->created_at->format('m')=="05") <td>{{ ($registro->created_at->format('d-m-Y')) }}</td> @endif