app/Console/Commands/DailyDeliveryUpdate.php
/**
     * Execute the console command.
     *
     * @return int
     */
Execute the console command.
@return int
Execute the console command . @return int
public function handle()
    {
        $deliveries=Deliverie::pluck('order_id')->all();
        $orders=Order::where('status','Delivered')
            ->whereNotIn('id',$deliveries)
               ->get();
        $this->deliverRepository->moveToDelivery($orders);
        $this->info('Successfully moved order to delivery table.');
    }
public function handle ( ) { $ deliveries = Deliverie :: pluck ( 'order_id' ) -> all ( ) ; $ orders = Order :: where ( 'status' , 'Delivered' ) -> whereNotIn ( 'id' , $ deliveries ) -> get ( ) ; $ this -> deliverRepository -> moveToDelivery ( $ orders ) ; $ this -> info ( 'Successfully moved order to delivery table.' ) ; }
Execute the console command.
Execute the console command .