project-management/app/View/Components/FormControlInput.php
2022-05-04 01:00:10 +08:00

43 lines
800 B
PHP

<?php
namespace App\View\Components;
use Illuminate\View\Component;
class FormControlInput extends Component
{
public $type;
public $required;
public $id;
public $name;
public $value;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($name, $type = 'text', $id = '', $value = '', $required = false)
{
$this->id = $id;
$this->name = $name;
$this->required = $required;
$this->type = $type;
$this->value = $value;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
return view('components.form-control-input');
}
}