<?php
namespace App\Console\Commands;

use App\Services\Parser\Parser;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;

#[Signature('app:parse-cars')]
#[Description('Command description')]
class ParseCars extends Command
{
    /**
     * Execute the console command.
     */
    public function handle()
    {
        $cars = (new Parser())->run();

        file_put_contents('cars.json', json_encode($cars, JSON_PRETTY_PRINT));
        dd($cars);
    }
}
