Print output of CRON in the terminal - Laravel

Asked

Viewed 43 times

0

I created a CRON on Laravel and wanted to print information on the terminal where the command is running (Ubuntu terminal, in this case).

What is the command for this in the Laravel?

Example:

public function handle()
{
    $digitalCertificates = DB::table('digital_certificates')->get();

    $today = new \DateTime();

    foreach($digitalCertificates as $digitalCertificate) {

        $expirationDate = $digitalCertificate->expirationDate;
        $interval = $today->diff($expirationDate)->days;

        print($interval); //EXEMPLO. Informação a ser printada no terminal

    }
}

1 answer

1


The "echo" itself resolves its doubt.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.