<?php
require __DIR__ . '/../vendor/autoload.php';
// Bootstrap the framework to use Eloquent and model
$app = require_once __DIR__ . '/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

use App\Models\User;

$u = User::where('email', 'admin')->first();
if (! $u) {
    echo "Admin user not found\n";
    exit(1);
}
echo $u->createToken('cli-token')->plainTextToken . "\n";
