Skip to content

Commit 5f59154

Browse files
committed
Update README.md
1 parent b912e96 commit 5f59154

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class RecentNews extends AbstractWidget {
132132
```
133133
`['count' => 10]` is a config array that can be accessed by $this->config.
134134

135-
> Note: Config fields that are not specified when you call the widget aren't overridden:
135+
> Note: Config fields that are not specified when you call a widget aren't overridden:
136136
137137
```php
138138
class RecentNews extends AbstractWidget {
@@ -148,7 +148,7 @@ class RecentNews extends AbstractWidget {
148148
@widget('recentNews', ['count' => 10]) // $this->config['foo'] is still 'bar'
149149
```
150150

151-
Config array is available in all widget methods so you can use it to configure placeholder and container too (see below)
151+
Config array is available in every widget method so you can use it to configure placeholder and container too (see below)
152152

153153
### Directly
154154

@@ -169,26 +169,26 @@ By default the package tries to find your widget in the ```App\Widgets``` namesp
169169

170170
You can override this by publishing package config and setting `default_namespace` property.
171171

172-
To publish config use: ```php artisan vendor:publish --provider="Arrilot\Widgets\ServiceProvider"```
172+
Publish config command - ```php artisan vendor:publish --provider="Arrilot\Widgets\ServiceProvider"```
173173

174174
Although using the default namespace is very convenient, in some situations you may wish to have more flexibility.
175175
For example, if you've got dozens of widgets it makes sense to group them in namespaced folders.
176176

177-
You have two ways to call those widgets:
177+
No problem, you have several ways to call those widgets:
178178

179-
1) You can pass the full widget name from the `default_namespace` (basically `App\Widgets`) to the `run` method.
179+
1) Pass a full widget name from the `default_namespace` (basically `App\Widgets`) to the `run` method.
180180
```php
181181
@widget('News\RecentNews', $config)
182182
{{ Widget::run('News\RecentNews', $config) }}
183183
```
184184

185-
2) You can use dot notation instead.
185+
2) Use dot notation.
186186
```php
187187
@widget('news.recentNews', $config)
188188
{{ Widget::run('news.recentNews', $config) }}
189189
```
190190

191-
You can pass FQCN too.
191+
3) FQCN is also an option.
192192
```php
193193
@widget('\App\Http\Some\Namespace\Widget', $config)
194194
{{ Widget::run('\App\Http\Some\Namespace\Widget', $config) }}
@@ -218,7 +218,7 @@ public function placeholder()
218218

219219
You can go even further and automatically reload widget every N seconds.
220220

221-
To achieve that simply set the `$reloadTimeout` property of the widget class.
221+
Just set the `$reloadTimeout` property of the widget class and you are done.
222222

223223
```php
224224
class RecentNews extends AbstractWidget
@@ -231,7 +231,6 @@ class RecentNews extends AbstractWidget
231231
public $reloadTimeout = 10;
232232
}
233233
```
234-
Done.
235234

236235
Both sync and async widgets can become reloadable.
237236

0 commit comments

Comments
 (0)