#!/usr/bin/env php
<?php

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader (Lab01_Framework - Lab 06)
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually.
|
*/

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require __DIR__ . '/vendor/autoload.php';
    $app = require_once __DIR__ . '/bootstrap/app.php';
    $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
    $status = $kernel->handle(
        $input = new Symfony\Component\Console\Input\ArgvInput,
        new Symfony\Component\Console\Output\ConsoleOutput
    );
    $kernel->terminate($input, $status);
    exit($status);
}

// Mô phỏng CLI Artisan khi chưa chạy composer install
echo "Laravel Framework 10.x (Lab01_Framework - Lab 06 Simulation)\n";
echo "Usage: php artisan [command] [options]\n\n";
echo "Available commands for Lab 06:\n";
echo "  serve                        Start the Laravel development server\n";
echo "  migrate                      Run the database migrations\n";
echo "  db:seed                      Seed the database with records\n";
echo "  make:model                   Create a new Eloquent model class\n";
echo "  make:controller              Create a new controller class\n";
echo "  make:component               Create a new view component class\n";
echo "  make:migration               Create a new migration file\n";
echo "  make:seeder                  Create a new seeder class\n";
echo "  make:factory                 Create a new model factory\n";
echo "  test                         Run the application tests\n";
