druc/laravel-wire

从您的应用程序环境中导入文件和数据库。

资助包维护!
druc

v0.0.6 2022-03-24 13:28 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

从您的应用程序环境中导入文件和数据库。

警告:此包高度实验性,可能存在潜在风险 :)

安装

您可以通过composer安装此包

composer require druc/laravel-wire

您可以使用以下命令发布配置文件

php artisan vendor:publish --tag="wire-config"

这是已发布配置文件的内容

return [
    'default' => 'stage',
    'environments' => [
        'stage' => [
            'url' => 'https://your-stage-environment.com',
            'auth_key' => 'BqNbqyoxswma4bYzj8rnsAhfySp0york',
            'file_paths' => ['storage'],
            'excluded_file_paths' => [],
            'basic_auth' => [
                'enabled' => false,
                'username' => 'johndoe',
                'password' => 'supersecret'
            ]
        ]
    ]
];

数据库导入

# import all tables from default environment 
php artisan wire:db 

# import all tables from dev environment
php artisan wire:db dev

# import specific tables 
php artisan wire:db -t users,orders,order_items

# import while excluding specific tables 
php artisan wire:db -e users

文件导入

# import all files from paths found in the config file
php artisan wire:files

# import specific file paths
php artisan wire:files storage/avatars

# import while excluding specific file paths
php artisan wire:files storage --exclude=storage/media-library

# import from specific environment
php artisan wire:files --env=staging

测试

composer test

贡献

有关详细信息,请参阅CONTRIBUTING

安全漏洞

请查看我们的安全策略,了解如何报告安全漏洞。

致谢

许可

MIT许可(MIT)。有关更多信息,请参阅许可文件