*/ public function __construct( string $name, string $label = '', string $type = 'text', ?string $value = '', ?string $placeholder = '', bool $required = false ) { $this->name = $name; $this->label = $label ?: ucfirst($name); $this->type = $type; $this->value = $value; $this->placeholder = $placeholder; $this->required = $required; } /** * Render view của component */ public function render(): View|Closure|string { return view('components.input'); } }