operantions:make
command to return real path of the newly create file
#14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now the output of newly created operations file is:
php artisan operations:make Testing > INFO One-time operation [2023_05_05_103905_testing] created successfully.
There is one drawback of this format, you can't cmd+click on the operation name in terminal so that the filename would be opened in IDE.
Laravel has already changed that for migrations, and they return the full path to the filename, so it is possible to cmd+click on it to be opened. An example:
php artisan make:migration testing > INFO Migration [database/migrations/2023_05_05_104143_testing.php] created successfully.
So in this PR I try to replicate the same format, so we can open the newly created operations file. Each saved second counts 😄
The new output would be:
php artisan operations:make Testing > INFO One-time operation [operations/2023_05_05_104056_testing.php] created successfully.