You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the `options` closure returns an associative array, then the closure will receive the selected keys; otherwise, it will receive the selected values. The closure may return an error message, or `null` if the validation passes.
612
613
614
+
<aname="pause"></a>
615
+
### Pause
616
+
617
+
The `pause` function may be used to display informational text to the user and wait for them to confirm their desire to proceed by pressing the Enter / Return key:
618
+
619
+
```php
620
+
use function Laravel\Prompts\pause;
621
+
622
+
pause('Press ENTER to continue.');
623
+
```
624
+
613
625
<aname="informational-messages"></a>
614
-
###Informational Messages
626
+
## Informational Messages
615
627
616
628
The `note`, `info`, `warning`, `error`, and `alert` functions may be used to display informational messages:
The `table` function makes it easy to display multiple rows and columns of data. All you need to do is provide the column names and the data for the table:
628
640
@@ -636,7 +648,7 @@ table(
636
648
```
637
649
638
650
<aname="spin"></a>
639
-
###Spin
651
+
## Spin
640
652
641
653
The `spin` function displays a spinner along with an optional message while executing a specified callback. It serves to indicate ongoing processes and returns the callback's results upon completion:
642
654
@@ -705,7 +717,7 @@ $progress->finish();
705
717
```
706
718
707
719
<aname="terminal-considerations"></a>
708
-
###Terminal Considerations
720
+
## Terminal Considerations
709
721
710
722
<aname="terminal-width"></a>
711
723
#### Terminal Width
@@ -718,7 +730,7 @@ If the length of any label, option, or validation message exceeds the number of
718
730
For any prompts that accept the `scroll` argument, the configured value will automatically be reduced to fit the height of the user's terminal, including space for a validation message.
719
731
720
732
<aname="fallbacks"></a>
721
-
###Unsupported Environments and Fallbacks
733
+
## Unsupported Environments and Fallbacks
722
734
723
735
Laravel Prompts supports macOS, Linux, and Windows with WSL. Due to limitations in the Windows version of PHP, it is not currently possible to use Laravel Prompts on Windows outside of WSL.
0 commit comments