lundi 3 septembre 2018

How do i check if a function is working fine without running it in the browser In PHP(Laravel 5.6)

Here is an example function that i'm trying to run.

    protected function schedule(Schedule $schedule)
    {
        $schedule->call(function () {
            $tickets = Ticketit::where('created_at', '<', Carbon::now()->subDays(1))->where('is_notified', false)->get();

            foreach ($tickets as $ticket) {
                //sending mail
                $mail= $message->to('bonderi@strathmore.edu')->body('Your ticket is overdue');

            }
        })->hourly();
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire