for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JeroenNoten\LaravelAdminLte\Components;
class InputSwitch extends InputGroupComponent
{
/**
* The Bootstrap Switch plugin configuration parameters. Array with
* key => value pairs, where the key should be an existing configuration
* property of the plugin.
*
* @var array
*/
public $config;
* Create a new component instance.
* Note this component requires the 'Bootstrap Switch' plugin.
* @return void
public function __construct(
$name, $label = null, $size = null, $labelClass = null,
$topClass = null, $disableFeedback = null, $config = []
) {
parent::__construct(
$name, $label, $size, $labelClass, $topClass, $disableFeedback
);
$this->config = is_array($config) ? $config : [];
}
* Make the class attribute for the input group item.
* @param string $invalid
* @return string
public function makeItemClass($invalid)
$classes = [];
if (! empty($invalid) && ! isset($this->disableFeedback)) {
$classes[] = 'is-invalid';
return implode(' ', $classes);
* Get the view / contents that represent the component.
* @return \Illuminate\View\View|string
public function render()
return view('adminlte::components.input-switch');