Form: adding checkbox component.
This commit is contained in:
parent
01b1b06541
commit
f9d44de6cb
3 changed files with 29 additions and 0 deletions
21
app/View/Components/Form/Checkbox.php
Normal file
21
app/View/Components/Form/Checkbox.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components\Form;
|
||||
|
||||
class Checkbox extends Input
|
||||
{
|
||||
public function __construct($name, ?string $id = null, ?string $value = null, bool $disabled = false)
|
||||
{
|
||||
parent::__construct($name, $id, 'checkbox', $value, $disabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.form.inputs.checkbox');
|
||||
}
|
||||
}
|
||||
Reference in a new issue