<?php

declare(strict_types=1);

$root = dirname(__DIR__, 2);

require $root.'/vendor/autoload.php';
$app = require $root.'/bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();

use App\Services\OtpService;

$payload = app(OtpService::class)->generateForMobile('919999000001', 'franchise_create_member');

echo json_encode([
    'sent' => true,
    'expires_in_minutes' => $payload['expires_in_minutes'] ?? null,
], JSON_UNESCAPED_SLASHES).PHP_EOL;
