diff --git a/resources/views/textarea.blade.php b/resources/views/textarea.blade.php new file mode 100644 index 0000000..3b686e1 --- /dev/null +++ b/resources/views/textarea.blade.php @@ -0,0 +1,6 @@ + +@error($name) + + {{ $message }} + +@enderror \ No newline at end of file diff --git a/src/Items/FormTextarea.php b/src/Items/FormTextarea.php new file mode 100644 index 0000000..59081a1 --- /dev/null +++ b/src/Items/FormTextarea.php @@ -0,0 +1,12 @@ +class = config('laravel-form.textarea.class', 'form-control'); + $this->viewName = 'textarea'; + } +} \ No newline at end of file diff --git a/src/LaravelForm.php b/src/LaravelForm.php index f7c6540..ce2098b 100644 --- a/src/LaravelForm.php +++ b/src/LaravelForm.php @@ -4,6 +4,7 @@ use Kgrzelak\LaravelForm\Items\FormInput; use Kgrzelak\LaravelForm\Items\FormSelect; +use Kgrzelak\LaravelForm\Items\FormTextarea; class LaravelForm { @@ -16,4 +17,9 @@ public static function select(): FormSelect { return new FormSelect(); } + + public static function textarea(): FormTextarea + { + return new FormTextarea(); + } } \ No newline at end of file