Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Latest Stable Version](https://poser.pugx.org/arrilot/laravel-widgets/v/stable.svg)](https://packagist.org/packages/arrilot/laravel-widgets/)
[![Total Downloads](https://img.shields.io/packagist/dt/arrilot/laravel-widgets.svg?style=flat)](https://packagist.org/packages/arrilot/laravel-widgets)
[![Build Status](https://img.shields.io/travis/arrilot/laravel-widgets/master.svg?style=flat)](https://travis-ci.org/arrilot/laravel-widgets)
[![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/)
[![Total Downloads](https://img.shields.io/packagist/dt/arrilot/laravel-widgets.svg)](https://packagist.org/packages/arrilot/laravel-widgets)
[![Build Status](https://img.shields.io/travis/arrilot/laravel-widgets/master.svg)](https://travis-ci.org/arrilot/laravel-widgets)
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/arrilot/laravel-widgets/master.svg)](https://scrutinizer-ci.com/g/arrilot/laravel-widgets/)

#Widgets for Laravel

Expand Down Expand Up @@ -76,7 +76,7 @@ class RecentNews extends AbstractWidget
{
//

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

```php
public function __construct(array $config = [])
{
$this->addConfigDefaults([
'child_key' => 'bar'
]);
public function __construct(array $config = [])
{
$this->addConfigDefaults([
'child_key' => 'bar'
]);

parent::__construct($config);
}
parent::__construct($config);
}
```

### Directly
Expand Down Expand Up @@ -220,7 +220,7 @@ This can be customized by adding a `placeholder()` method to the widget class.
```php
public function placeholder()
{
return "Loading...";
return 'Loading...';
}
```

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

```php
/**
* Async and reloadable widgets are wrapped in container.
* You can customize it by overriding this method.
*
* @return array
*/
public function container()
{
return [
'element' => 'div',
'attributes' => 'style="display:inline" class="arrilot-widget-container"',
];
}
/**
* Async and reloadable widgets are wrapped in container.
* You can customize it by overriding this method.
*
* @return array
*/
public function container()
{
return [
'element' => 'div',
'attributes' => 'style="display:inline" class="arrilot-widget-container"',
];
}
```

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

// display them in a view in the correct order
@widgetGroup('sidebar')
//or
// or
{{ Widget::group('sidebar')->display() }}
```

Expand Down