https://laracasts.com/discuss/channels/laravel/laravel-console-auto-confirm-after-sometimes
It a very nice feature to have, any chance it will appear in laravel :+1:
Like I said in your thread there:
That's kind of an anti-pattern isn't it? if I am being asked if I want to continue on deleting the whole drive by accident, I'd want it to wait until I actually say yes, not just assume because I never answered, I meant yes.
It not the same thing, the feature I suggest is allowing to have a 30s (yes), it have many use case.
And the software that deleting whole drive of course have to be written to wait forever until user confirm.
I'm against such things... or at least choose NO after inactivity :) You can run command and go make some tea... and don't know that action was executed because of time passed.
@kocoten1992 Can you show us concrete example where auto-confirmation is required?
@a-komarev be realistic, there are many famous program work like that, hirenboot, norton ghost... the point is to save times, just run it, leave everything to default, and it will work.
When developer choose to build yes after sometimes, it mean a yes is okay, a default choice that fine for most people, I'm thinking of API like this:
if ($this->confirm('Do you wish to continue', null or 'yes/no', 30) {}
// if not specify 'yes/no' (then it null), every thing is as default - wait forever
// if specify, then it will countdown
@kocoten1992 I'm asking for concrete real example of command where this could be useful. I don't see it could be useful for current artisan commands.
Not the right place to be discussing this, it should be on internals repo...
Anyway I'm also 馃憥 here.
You can aleady use --force if you don't want to confirm anything.
For suggestions and feature requests please use the https://github.com/laravel/internals repo.
Most helpful comment
Not the right place to be discussing this, it should be on internals repo...
Anyway I'm also 馃憥 here.
You can aleady use
--forceif you don't want to confirm anything.