2017 © Pedro Peláez
 

library laravel-command-once

execute command only once

image

yuanben/laravel-command-once

execute command only once

  • Sunday, May 14, 2017
  • by DearMadMan
  • Repository
  • 1 Watchers
  • 3 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 9 % Grown

The README.md

Yuanben Command Once

Installion

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

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:, (*2)

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

    Yuanben\CommandOnce\CommandOnceServiceProvider::class,
]

Publish

Next, you need execute publish command:, (*3)

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:, (*4)

php artisan migrate

Usage

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

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:, (*6)

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., (*7)

The Versions

14/05 2017

dev-master

9999999-dev

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

14/05 2017

v0.0.7

0.0.7.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

11/05 2017

v0.0.6

0.0.6.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

11/05 2017

v0.0.5

0.0.5.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

08/05 2017

v0.0.4

0.0.4.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

28/04 2017

v0.0.1

0.0.1.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once

28/04 2017

v0.0.2

0.0.2.0

execute command only once

  Sources   Download

MIT

The Requires

 

by Avatar DearMadMan

laravel command-once