| @@ 8-23 (lines=16) @@ | ||
| 5 | use Illuminate\Contracts\Support\Htmlable; |
|
| 6 | use SoareCostin\BladeFormComponents\FormElements\Select; |
|
| 7 | ||
| 8 | class SelectComponent implements Htmlable |
|
| 9 | { |
|
| 10 | public function __construct(array $params = []) |
|
| 11 | { |
|
| 12 | $this->element = new Select($params); |
|
| 13 | } |
|
| 14 | ||
| 15 | public function toHtml() |
|
| 16 | { |
|
| 17 | $theme = config('blade-form-components.theme'); |
|
| 18 | ||
| 19 | return view( |
|
| 20 | 'blade-form-components::themes.'.$theme.'.select', ['element' => $this->element, 'theme' => $theme] |
|
| 21 | ); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| @@ 8-26 (lines=19) @@ | ||
| 5 | use Illuminate\Contracts\Support\Htmlable; |
|
| 6 | use SoareCostin\BladeFormComponents\FormElements\Textarea; |
|
| 7 | ||
| 8 | class TextareaComponent implements Htmlable |
|
| 9 | { |
|
| 10 | /** @var SoareCostin\BladeFormComponents\FormElements\Textarea */ |
|
| 11 | protected $element; |
|
| 12 | ||
| 13 | public function __construct(array $params = []) |
|
| 14 | { |
|
| 15 | $this->element = new Textarea($params); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function toHtml() |
|
| 19 | { |
|
| 20 | $theme = config('blade-form-components.theme'); |
|
| 21 | ||
| 22 | return view( |
|
| 23 | 'blade-form-components::themes.'.$theme.'.textarea', ['element' => $this->element, 'theme' => $theme] |
|
| 24 | ); |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||