|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace JeroenNoten\LaravelAdminLte\Components; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\View\Component; |
|
6
|
|
|
|
|
7
|
|
|
class Input extends Component |
|
8
|
|
|
{ |
|
9
|
|
|
public $type, $id, $name, $label, $placeholder; |
|
10
|
|
|
public $topclass, $inputclass; |
|
11
|
|
|
public $value, $disabled, $required; |
|
12
|
|
|
public $step, $max, $maxlength, $pattern; |
|
13
|
|
|
|
|
14
|
|
|
public function __construct( |
|
15
|
|
|
$type = 'text', $id = null, $name = null, |
|
16
|
|
|
$label = 'Input Label', $placeholder = null, |
|
17
|
|
|
$topclass = null, $inputclass = null, |
|
18
|
|
|
$value = null, $disabled = false, $required = false, |
|
19
|
|
|
$step = null, $max = null, $maxlength = null, $pattern = null |
|
20
|
|
|
) |
|
21
|
|
|
{ |
|
22
|
|
|
$this->type = $type; |
|
23
|
|
|
$this->id = $id; |
|
24
|
|
|
$this->name = $name; |
|
25
|
|
|
$this->label = $label; |
|
26
|
|
|
$this->placeholder = $placeholder; |
|
27
|
|
|
$this->topclass = $topclass; |
|
28
|
|
|
$this->inputclass = $inputclass; |
|
29
|
|
|
$this->value = $value; |
|
30
|
|
|
$this->required = $required; |
|
31
|
|
|
$this->disabled = $disabled; |
|
32
|
|
|
$this->step = $step; |
|
33
|
|
|
$this->max = $max; |
|
34
|
|
|
$this->maxlength = $maxlength; |
|
35
|
|
|
$this->pattern = $pattern; |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
public function render() |
|
39
|
|
|
{ |
|
40
|
|
|
return view('adminlte::input'); |
|
41
|
|
|
} |
|
42
|
|
|
} |