This repository was archived by the owner on Aug 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -258,13 +258,33 @@ you can copy `default.blade.php` file as `custom.blade.php` and use custom style
258
258
```
259
259
you can also set the style globaly with ` BsForm::style() ` method before the form open as well
260
260
```
261
- @php(BsForm::resource('users')-> style('custom'))
261
+ @php(BsForm::style('custom'))
262
262
```
263
263
264
264
or
265
265
266
266
```
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() }}
268
288
```
269
289
270
290
<a name =" custom-component " ></a >
You can’t perform that action at this time.
0 commit comments