PHPackages                             zanysoft/laravel-widgets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zanysoft/laravel-widgets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zanysoft/laravel-widgets
========================

Asynchronous widgets, reloadable widgets, console generator, caching - everything you can think of.

1.3(3y ago)2353MITPHPPHP &gt;=7.4CI failing

Since Jul 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zanysoft/laravel-widgets)[ Packagist](https://packagist.org/packages/zanysoft/laravel-widgets)[ Docs](https://github.com/zanysoft/laravel-widgets)[ RSS](/packages/zanysoft-laravel-widgets/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/ee1f60f2103f90a6e97f0a5687c3e668d555c7bc8a15eb0adb87bb3bd2a6a3e5/68747470733a2f2f706f7365722e707567782e6f72672f7a616e79736f66742f6c61726176656c2d776964676574732f762f737461626c652e737667)](https://packagist.org/packages/zanysoft/laravel-widgets/)[![Total Downloads](https://camo.githubusercontent.com/6f73b941111ae8aff3d128ac53b99d89ff040673b087d3a8cb52bb9af47a2115/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a616e79736f66742f6c61726176656c2d776964676574732e737667)](https://packagist.org/packages/zanysoft/laravel-widgets)[![Build Status](https://camo.githubusercontent.com/0c4501d03ec0c95c4e87e87e7948a1de8217ecd25c9a6e08b1cc6a10657daf25/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a616e79736f66742f6c61726176656c2d776964676574732f6d61737465722e737667)](https://travis-ci.org/zanysoft/laravel-widgets)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/7120e6316234e900848f962a5c4774ed2b7b0b64820c2d8dd4536cf12a1cff63/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7a616e79736f66742f6c61726176656c2d776964676574732f6d61737465722e737667)](https://scrutinizer-ci.com/g/zanysoft/laravel-widgets/)

Widgets for Laravel
===================

[](#widgets-for-laravel)

*A powerful alternative to view composers. Asynchronous widgets, reloadable widgets, console generator, caching - everything that you can imagine.*

Installation
------------

[](#installation)

Run `composer require zanysoft/laravel-widgets`

Laravel &gt;=5.5 uses Package Auto-Discovery, so you don't need to manually add the ServiceProvider and Facades

1. Register a service provider in the `app.php` configuration file if not auto-discover

```

```

2. Add some facades here too if not auto-discover.

```

```

Usage
-----

[](#usage)

Let's consider that we want to make a list of recent news and reuse it in several views.

First of all we can create a Widget class using the artisan command provided by the package.

```
php artisan make:widget RecentNews
```

This command generates two files:

1. `resources/views/widgets/recent_news.blade.php` is an empty view.

Add "--plain" option if you do not need a view.

2. `app/Widgets/RecentNews` is a widget class.

```
