承接 yuanben/laravel-command-once 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yuanben/laravel-command-once

Composer 安装命令:

composer require yuanben/laravel-command-once

包简介

execute command only once

README 文档

README

Installion

To get started with Command Once, add to your composer.json file as a dependency:

composer require yuanben/laravel-command-once

Configure

After installing the Command Once library, register the Yuanben\CommandOnce\CommandOnceServiceProvider in your config/app.php configuration file:

'providers' => [
    // Other service providers...

    Yuanben\CommandOnce\CommandOnceServiceProvider::class,
]

Publish

Next, you need execute publish command:

php artisan vendor:publish

This command will publish command.php config file to you application config directory. also, it will publish create command once table migration file to you migration directory. So, you also need to do migrate:

php artisan migrate

Usage

Within command.php file, you need list what commands do you want execute just only once:

return [
    'execs' => [
        'storage:link' => 'v0.0.1',
        'db:seed' => 'my version',
        'cache:clear {--help:} {store:redis} => 'version',
        '!ls -al' => 'version'
    ]
];

Then you can execute command like this:

php artisan command:once

This command will compare the listed command and version above with the database, if they never executed, the command will do it for you.

统计信息

  • 总下载量: 1.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固