<?php

namespace App\Console\Commands;

use App\Services\ServiceGoogleSheet;
use Illuminate\Console\Command;

class ScrapingLeaderData extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'app:scraping-leader-data';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Scraping leader data from google spreadsheet and save to database';

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $service_google_sheet = app(ServiceGoogleSheet::class);
        $service_google_sheet->sync_leader_data();
        $this->info('Leader data synced successfully');
    }
}
