Skip to content

Commit 8ba9b09

Browse files
committed
Update README.md
1 parent eb1ea08 commit 8ba9b09

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function run($sort_by, $sort_order) { }
161161
...
162162
```
163163

164-
`run()` method is resolved via Laravel service container so method injection is available here too.
164+
`run()` method is resolved via Service Container, so method injection is available here too.
165165

166166
## Namespaces
167167

@@ -201,7 +201,7 @@ In some situations it can be very beneficial to load widget content with AJAX.
201201
Fortunately, this can be achieved very easily!
202202
All you need to do is to change facade or blade directive - `Widget::` => `AsyncWidget::`, `@widget` => `@asyncWidget`
203203

204-
> Note: Since version 3.1 you no longer need `jquery` to make ajax calls. However you can set `use_jquery_for_ajax_calls` to `true` in the config file if you need it.
204+
> Note: Since version 3.1 you no longer need `jquery` to make ajax calls. However you can set `use_jquery_for_ajax_calls` to `true` in the config file if you need for some reason.
205205
206206
By default nothing is shown until ajax call is finished.
207207

@@ -241,7 +241,7 @@ Consider using web sockets too but they are waaaay harder to set up on the other
241241

242242
## Container
243243

244-
Async and Reloadable widgets both require some DOM interaction so they wrap all widget output in a container.
244+
Async and Reloadable widgets both require some DOM interaction so they wrap all widget output in a html container.
245245
This container is defined by AbstractWidget::container() method and can be customized therefore.
246246

247247
```php
@@ -279,14 +279,13 @@ class RecentNews extends AbstractWidget
279279
```
280280

281281
No caching is turned on by default.
282-
A cache key depends on widget name and each widget parameter.
283-
override ```cacheKey``` method if you need to adjust it.
282+
A cache key depends on a widget name and each widget parameter.
283+
Override ```cacheKey``` method if you need to adjust it.
284284

285285
## Widget groups (extra)
286286

287-
In most cases Blade is a perfect tool fot setting the position and order of widgets.
288-
However, in some cases you may find useful the approach with widget groups.
289-
Please check the following example:
287+
In most cases Blade is a perfect tool for setting the position and order of widgets.
288+
However, in some cases you may find useful the approach with widget groups:
290289

291290
```php
292291
// add several widgets to the 'sidebar' group anywhere you want (even in controller)
@@ -312,8 +311,8 @@ You can also set a separator to display between widgets in a group.
312311

313312
### Checking the state of a widget group
314313

315-
`Widget::group('sidebar')->isEmpty();`
314+
`Widget::group('sidebar')->isEmpty(); // bool`
316315

317-
`Widget::group('sidebar')->any();`
316+
`Widget::group('sidebar')->any(); // bool`
318317

319-
`Widget::group('sidebar')->count();`
318+
`Widget::group('sidebar')->count(); // int`

0 commit comments

Comments
 (0)