Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
vendor
/
laravel
/
prompts
/
src
/
Exceptions
:
TextPrompt.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Laravel\Prompts; class TextPrompt extends Prompt { use Concerns\TypedValue; /** * Create a new TextPrompt instance. */ public function __construct( public string $label, public string $placeholder = '', public string $default = '', public bool|string $required = false, public mixed $validate = null, public string $hint = '', ) { $this->trackTypedValue($default); } /** * Get the entered value with a virtual cursor. */ public function valueWithCursor(int $maxWidth): string { if ($this->value() === '') { return $this->dim($this->addCursor($this->placeholder, 0, $maxWidth)); } return $this->addCursor($this->value(), $this->cursorPosition, $maxWidth); } }