PHP code example of luminee / chariot

1. Go to this page and download the library: Download luminee/chariot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luminee / chariot example snippets


$app->singleton(
    Luminee\Chariot\Contracts\Console\Kernel::class,
    class_exists('App\\Console\\Kernel') ?
        Luminee\Chariot\Console\KernelArtisan::class :
        Luminee\Chariot\Console\KernelChariot::class
);

// config/chariot.php
return [
    'scripts_dir' => base_path('database/scripts'),

    'signature' => [
        'directory_separator' => '#',   // 目录前缀与签名之间的分隔符
        'connection_separator' => '@',  // 签名与连接名之间的分隔符
    ],
];

use Luminee\Chariot\Console\Command;

return new class extends Command {
    protected $signature = 'sync:orders';

    public function handle()
    {
        // 脚本逻辑
    }
};
bash
php chariot trade.order#sync@dev
bash
php artisan vendor:publish --provider="Luminee\\Chariot\\ChariotServiceProvider"
bash
php artisan trade.order#sync:orders@dev