Skip to content

Commit d55b27a

Browse files
committed
wip
1 parent db60049 commit d55b27a

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

prompts.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Suggest](#suggest)
1212
- [Search](#search)
1313
- [Multi-search](#multisearch)
14+
- [Pause](#pause)
1415
- [Informational Messages](#informational-messages)
1516
- [Tables](#tables)
1617
- [Spin](#spin)
@@ -610,8 +611,19 @@ $ids = multisearch(
610611

611612
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.
612613

614+
<a name="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+
613625
<a name="informational-messages"></a>
614-
### Informational Messages
626+
## Informational Messages
615627

616628
The `note`, `info`, `warning`, `error`, and `alert` functions may be used to display informational messages:
617629

@@ -622,7 +634,7 @@ info('Package installed successfully.');
622634
```
623635

624636
<a name="tables"></a>
625-
### Tables
637+
## Tables
626638

627639
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:
628640

@@ -636,7 +648,7 @@ table(
636648
```
637649

638650
<a name="spin"></a>
639-
### Spin
651+
## Spin
640652

641653
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:
642654

@@ -705,7 +717,7 @@ $progress->finish();
705717
```
706718

707719
<a name="terminal-considerations"></a>
708-
### Terminal Considerations
720+
## Terminal Considerations
709721

710722
<a name="terminal-width"></a>
711723
#### Terminal Width
@@ -718,7 +730,7 @@ If the length of any label, option, or validation message exceeds the number of
718730
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.
719731

720732
<a name="fallbacks"></a>
721-
### Unsupported Environments and Fallbacks
733+
## Unsupported Environments and Fallbacks
722734

723735
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.
724736

0 commit comments

Comments
 (0)