Update source into github
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Input;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class InputSwitch extends Component
|
||||
{
|
||||
public $name;
|
||||
public $value;
|
||||
public $checked;
|
||||
|
||||
public function __construct($name = '', $value = '', $checked = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
$this->checked = filter_var($checked, FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.input.switch');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user