X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/laravel/prompts/src
home
/
prisjneg
/
public_html
/
vendor
/
laravel
/
prompts
/
src
/
📁
..
📁
Concerns
📄
ConfirmPrompt.php
(1.36 KB)
📁
Exceptions
📄
FormBuilder.php
(9.28 KB)
📄
FormStep.php
(1.32 KB)
📄
Key.php
(1.53 KB)
📄
MultiSearchPrompt.php
(6.12 KB)
📄
MultiSelectPrompt.php
(4.13 KB)
📄
Note.php
(702 B)
📁
Output
📄
PasswordPrompt.php
(1 KB)
📄
PausePrompt.php
(568 B)
📄
Progress.php
(4.59 KB)
📄
Prompt.php
(10.04 KB)
📄
SearchPrompt.php
(4.03 KB)
📄
SelectPrompt.php
(3.25 KB)
📄
Spinner.php
(3.24 KB)
📄
SuggestPrompt.php
(3.97 KB)
📄
Table.php
(1.58 KB)
📄
Terminal.php
(2.43 KB)
📄
TextPrompt.php
(885 B)
📄
TextareaPrompt.php
(6.83 KB)
📁
Themes
📄
helpers.php
(7.7 KB)
Editing: FormStep.php
<?php namespace Laravel\Prompts; use Closure; class FormStep { protected readonly Closure $condition; public function __construct( protected readonly Closure $step, bool|Closure $condition, public readonly ?string $name, protected readonly bool $ignoreWhenReverting, ) { $this->condition = is_bool($condition) ? fn () => $condition : $condition; } /** * Execute this step. * * @param array<mixed> $responses */ public function run(array $responses, mixed $previousResponse): mixed { if (! $this->shouldRun($responses)) { return null; } return ($this->step)($responses, $previousResponse); } /** * Whether the step should run based on the given condition. * * @param array<mixed> $responses */ protected function shouldRun(array $responses): bool { return ($this->condition)($responses); } /** * Whether this step should be skipped over when a subsequent step is reverted. * * @param array<mixed> $responses */ public function shouldIgnoreWhenReverting(array $responses): bool { if (! $this->shouldRun($responses)) { return true; } return $this->ignoreWhenReverting; } }
Upload File
Create Folder