Skip to content
This repository was archived by the owner on Aug 30, 2020. It is now read-only.

Commit 2a04da5

Browse files
committed
update readme.md
1 parent 24003f1 commit 2a04da5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,33 @@ you can copy `default.blade.php` file as `custom.blade.php` and use custom style
258258
```
259259
you can also set the style globaly with `BsForm::style()` method before the form open as well
260260
```
261-
@php(BsForm::resource('users')->style('custom'))
261+
@php(BsForm::style('custom'))
262262
```
263263

264264
or
265265

266266
```
267-
{{ BsForm::resource('users')->style('custom') }}
267+
@php(BsForm::resource('users')->style('custom'))
268+
```
269+
270+
to reset the custom style to the default you should call `clearStyle()` method as well
271+
```
272+
@php(BsForm::clearStyle())
273+
```
274+
275+
For Example :
276+
```
277+
@php(BsForm::resource('users')->style('web'))
278+
{{ BsForm::model($user, route('users.update', $user)) }}
279+
{{-- All fields here uses web style --}}
280+
{{ BsForm::text('name') }}
281+
{{ BsForm::text('email') }}
282+
@php(BsForm::clearStyle())
283+
{{-- All fields after clearing uses default style --}}
284+
{{ BsForm::text('phone') }}
285+
{{ BsForm::textarea('address') }}
286+
{{ BsForm::submit()->style('inline') }}
287+
{{ BsForm::close() }}
268288
```
269289

270290
<a name="custom-component"></a>

0 commit comments

Comments
 (0)