Skip to content

Commit e1848fc

Browse files
authored
Merge pull request #71 from lex111/patch-3
Update README.md
2 parents b115c03 + ef90947 commit e1848fc

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Latest Stable Version](https://poser.pugx.org/arrilot/laravel-widgets/v/stable.svg)](https://packagist.org/packages/arrilot/laravel-widgets/)
2-
[![Total Downloads](https://img.shields.io/packagist/dt/arrilot/laravel-widgets.svg?style=flat)](https://packagist.org/packages/arrilot/laravel-widgets)
3-
[![Build Status](https://img.shields.io/travis/arrilot/laravel-widgets/master.svg?style=flat)](https://travis-ci.org/arrilot/laravel-widgets)
4-
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/arrilot/laravel-widgets/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/arrilot/laravel-widgets/)
2+
[![Total Downloads](https://img.shields.io/packagist/dt/arrilot/laravel-widgets.svg)](https://packagist.org/packages/arrilot/laravel-widgets)
3+
[![Build Status](https://img.shields.io/travis/arrilot/laravel-widgets/master.svg)](https://travis-ci.org/arrilot/laravel-widgets)
4+
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/arrilot/laravel-widgets/master.svg)](https://scrutinizer-ci.com/g/arrilot/laravel-widgets/)
55

66
#Widgets for Laravel
77

@@ -76,7 +76,7 @@ class RecentNews extends AbstractWidget
7676
{
7777
//
7878

79-
return view("widgets.recent_news", [
79+
return view('widgets.recent_news', [
8080
'config' => $this->config,
8181
]);
8282
}
@@ -153,14 +153,14 @@ In this case do the following:
153153
2) Add defaults like that instead:
154154

155155
```php
156-
public function __construct(array $config = [])
157-
{
158-
$this->addConfigDefaults([
159-
'child_key' => 'bar'
160-
]);
156+
public function __construct(array $config = [])
157+
{
158+
$this->addConfigDefaults([
159+
'child_key' => 'bar'
160+
]);
161161

162-
parent::__construct($config);
163-
}
162+
parent::__construct($config);
163+
}
164164
```
165165

166166
### Directly
@@ -220,7 +220,7 @@ This can be customized by adding a `placeholder()` method to the widget class.
220220
```php
221221
public function placeholder()
222222
{
223-
return "Loading...";
223+
return 'Loading...';
224224
}
225225
```
226226

@@ -255,19 +255,19 @@ Async and Reloadable widgets both require some DOM interaction so they wrap all
255255
This container is defined by `AbstractWidget::container()` method and can be customized too.
256256

257257
```php
258-
/**
259-
* Async and reloadable widgets are wrapped in container.
260-
* You can customize it by overriding this method.
261-
*
262-
* @return array
263-
*/
264-
public function container()
265-
{
266-
return [
267-
'element' => 'div',
268-
'attributes' => 'style="display:inline" class="arrilot-widget-container"',
269-
];
270-
}
258+
/**
259+
* Async and reloadable widgets are wrapped in container.
260+
* You can customize it by overriding this method.
261+
*
262+
* @return array
263+
*/
264+
public function container()
265+
{
266+
return [
267+
'element' => 'div',
268+
'attributes' => 'style="display:inline" class="arrilot-widget-container"',
269+
];
270+
}
271271
```
272272

273273
> Note: Nested async or reloadable widgets are not supported.
@@ -306,7 +306,7 @@ Widget::group('sidebar')->position(4)->addAsyncWidget('widgetName2', $config2);
306306

307307
// display them in a view in the correct order
308308
@widgetGroup('sidebar')
309-
//or
309+
// or
310310
{{ Widget::group('sidebar')->display() }}
311311
```
312312

0 commit comments

Comments
 (0)