File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
resources/views/components Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,16 @@ He accept all normal attributes of textarea tag and add some new attributes:
70
70
- label-class: add class to label tag
71
71
- other attributes will be added to textarea tag
72
72
73
+ ### Form Component
74
+ ``` html
75
+ <x-template-components::form >
76
+
77
+ </x-template-components::form >
78
+ ```
79
+ he accept all normal attributes of form tag and add some new attributes:
80
+ - route: route name that will be used in form action
81
+ - other attributes will be added to form tag
82
+
73
83
## Supported Templates
74
84
75
85
- [ Vuexy] ( https://demos.pixinvent.com/vuexy-html-admin-template/landing/ )
Original file line number Diff line number Diff line change
1
+ <form action =" {{ $attributes -> get (' action' ) ?? route ($attributes -> get (' route' )) } }" {{ $attributes } } >
2
+ @csrf
3
+ {{ $slot } }
4
+ </form >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ // test form component
4
+
5
+ use Illuminate \Support \Facades \View ;
6
+
7
+ it ('can render form component ' , function () {
8
+ $ this ->assertTrue (View::exists ('template-components::form ' ));
9
+ });
You can’t perform that action at this time.
0 commit comments