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


return [
    'scripts_dir' => base_path('database/scripts'), // 脚本存储目录
    'signature' => [
        'directory_separator' => '#', // 目录分隔符
        'connection_separator' => '@' // 连接分隔符
    ],
    'extra_connections' => [] // 额外数据库连接配置
];



use Luminee\Chariot\Console\Command;

return new class extends Command {
    protected $signature = 'init:user';

    public function handle() {
        // 脚本逻辑实现
    }
};
bash
php artisan vendor:publish --provider="Luminee\Chariot\ChariotServiceProvider"
bash
php artisan chariot:make:script init:user \
    --project=Project \
    --module=User
bash
php artisan project.user#init:user@dev