Laravel - Artisan Console - Asking For Confirmation

If you need to ask the user for a simple "yes or no" confirmation, you may use the confirm method. By default, this method will return false. However, if the user enters y or yes in response to the prompt, the method will return true.

    
    if ($this->confirm('Do you wish to continue?')) {
        //
    }
	

If necessary, you may specify that the confirmation prompt should return true by default by passing true as the second argument to the confirm method:

    
    if ($this->confirm('Do you wish to continue?', true)) {
        //
    }