This package publishes a config/post_script.php file. If you already have a file by that name, please rename or remove it.
You can install the package via composer:
composer require tangoslee/post-script
Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:
' providers' => [
// ...
Tangoslee\P ostScript\P ostScriptServiceProvider::class,
];
You should publish the migration and the config/post_script.php config file with:
php artisan vendor:publish --provider=" Tangoslee\PostScript\PostScriptServiceProvider"
Run the migrations: After the config and migration have been published and configured, you can create the tables for this package by running:
php artissan make:post-script foo_bar
/home/user/project/post-scripts/2024/08/2024_08_19_125037_foo_bar.sh created
php artisan post-script:status
+------+------------------------------+------------+----+
| Ran? | Script | Batch | ID |
+------+------------------------------+------------+----+
| Yes | 2024_08_09_123456_script.sh | 1723977236 | 1 |
| No | 2024_08_19_125037_foo_bar.sh | | |
+------+------------------------------+------------+----+
Run all scripts that have not been executed.
php artisan post-script:run
example. If you want to run ID 1 script again for some reason.
+------+------------------------------+------------+----+
| Ran? | Script | Batch | ID |
+------+------------------------------+------------+----+
| Yes | 2024_08_09_123456_script.sh | 1723977236 | 1 |
| No | 2024_08_19_125037_foo_bar.sh | | |
+------+------------------------------+------------+----+
php artisan post-script:run --replay 1