50 lines
947 B
PHP
50 lines
947 B
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
class FormControlSelect extends Component
|
|
{
|
|
public $name;
|
|
|
|
public $required;
|
|
|
|
public $id;
|
|
|
|
public $value;
|
|
|
|
public $options;
|
|
|
|
public $multiple;
|
|
|
|
/**
|
|
* @param $name
|
|
* @param $required
|
|
* @param $id
|
|
* @param $value
|
|
* @param $options
|
|
* @param $multiple
|
|
*/
|
|
public function __construct($name, $options, $required = false, $id ='', $value = '', $multiple = false)
|
|
{
|
|
$this->name = $name;
|
|
$this->options = $options;
|
|
$this->required = $required;
|
|
$this->id = $id;
|
|
$this->value = $value;
|
|
$this->multiple = $multiple;
|
|
}
|
|
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View|\Closure|string
|
|
*/
|
|
public function render()
|
|
{
|
|
return view('components.form-control-select');
|
|
}
|
|
}
|