app/Console/Commands/TareasProximasCommand.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $tareas = Tarea::whereBetween('fecha_notificacion', [Carbon::now()->toDateTimeString(),Carbon::now()->addMinutes(1)->toDateTimeString()])->where('realizado', 0)->get();
        foreach ($tareas as $tarea) {
            $tarea->usuario->notify(new TareaProximaNotification($tarea->id));
        }
    }
public function handle ( ) { $ tareas = Tarea :: whereBetween ( 'fecha_notificacion' , [ Carbon :: now ( ) -> toDateTimeString ( ) , Carbon :: now ( ) -> addMinutes ( 1 ) -> toDateTimeString ( ) ] ) -> where ( 'realizado' , 0 ) -> get ( ) ; foreach ( $ tareas as $ tarea ) { $ tarea -> usuario -> notify ( new TareaProximaNotification ( $ tarea -> id ) ) ; } }
Execute the console command.
Execute the console command .