These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Encore\Admin\Form\Field; |
||
4 | |||
5 | View Code Duplication | class Ip extends Text |
|
6 | { |
||
7 | protected $rules = 'nullable|ip'; |
||
8 | |||
9 | protected static $js = [ |
||
10 | '/vendor/laravel-admin/AdminLTE/plugins/input-mask/jquery.inputmask.bundle.min.js', |
||
11 | ]; |
||
12 | |||
13 | /** |
||
14 | * @see https://github.com/RobinHerbots/Inputmask#options |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $options = [ |
||
19 | 'alias' => 'ip', |
||
20 | ]; |
||
21 | |||
22 | public function render() |
||
23 | { |
||
24 | $this->inputmask($this->options); |
||
25 | |||
26 | $this->prepend('<i class="fa fa-laptop fa-fw"></i>') |
||
27 | ->defaultAttribute('style', 'width: 130px'); |
||
28 | |||
29 | return parent::render(); |
||
0 ignored issues
–
show
Bug
Compatibility
introduced
by
Loading history...
|
|||
30 | } |
||
31 | } |
||
32 |