PHP code example of it-brains / laravel-release-scripts
1. Go to this page and download the library: Download it-brains/laravel-release-scripts 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/ */
it-brains / laravel-release-scripts example snippets
use ITBrains\ReleaseScript\ScriptInterface;
class AddManagerRole implements ScriptInterface
{
/**
* Run the script.
*
* @return void
*/
public function run()
{
\App\Role::create(['title' => 'Manager']);
}
}
artisan release-script:run --class=AddManagerRole
php artisan make:release-script add_manage_role
...
php artisan release-script:run --force --migrate
...
php artisan make:release-script
php artisan release-script:run
php artisan release-script:status