1
I have a list of records and in this table I have a field data_limite
:
$planos = $this->plano->whereIn('id',$planos_id)
->orderBy('created_at','desc')
->get();
print($planos);
I’m listing the data from array
, I need to get some information that would be the data_limite
of this table and compare with the date of the day?
$dateAtual = date("d/m/Y");
$dateCriacao = date('d/m/Y', strtotime("+".$dias_liberacao." days",strtotime($data)));
if($dateCriacao <= $dateAtual)
{
return redirect()->route('listar-atividades')
->with('status', 'A Atividade não esta disponivel parar edição!');;
}
I don’t understand your doubt?
– novic
Use Carbon to compare dates: http://carbon.nesbot.com/docs/#api-comparison
– Marcos Kubis