Date Comparison in Laravel?

0

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 of array , but do I need to get 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!');;
}
    
asked by anonymous 22.03.2017 / 21:36

0 answers