<?php

namespace App\Console\Commands;

use App\Models\Rider;
use Illuminate\Console\Command;

class MakeAllRidersOfflineCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'rider:make-all-riders-offline';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'make all riders go offline';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        Rider::where("is_online", 1)->update(['is_online' => 0]);

        $this->info("all success");
    }
}
