Skip to content

Commit c19f250

Browse files
committedAug 6, 2023
done
1 parent fcc1513 commit c19f250

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
 

‎README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ He accept all normal attributes of textarea tag and add some new attributes:
7070
- label-class: add class to label tag
7171
- other attributes will be added to textarea tag
7272

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+
7383
## Supported Templates
7484

7585
- [Vuexy](https://demos.pixinvent.com/vuexy-html-admin-template/landing/)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<form action="{{ $attributes->get('action') ?? route($attributes->get('route')) }}" {{ $attributes }}>
2+
@csrf
3+
{{ $slot }}
4+
</form>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
});

0 commit comments

Comments
 (0)