PHPackages                             8xprovn/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. [Templating &amp; Views](/categories/templating)
4. /
5. 8xprovn/widgets

ActiveLibrary[Templating &amp; Views](/categories/templating)

8xprovn/widgets
===============

Widget for view

0925—0%PHP

Since Sep 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/8xprovn/laravel-widgets)[ Packagist](https://packagist.org/packages/8xprovn/widgets)[ RSS](/packages/8xprovn-widgets/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/688173ef7ccc0785537950b32067ebf604facd60f9909f5d8f564c55be503b4e/68747470733a2f2f706f7365722e707567782e6f72672f617272696c6f742f6c61726176656c2d776964676574732f762f737461626c652e737667)](https://packagist.org/packages/arrilot/laravel-widgets/)[![Total Downloads](https://camo.githubusercontent.com/37a5f78839f5e4b6e4e2432be193ffab7d774b2b298f635886da3483f3cb2a51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617272696c6f742f6c61726176656c2d776964676574732e737667)](https://packagist.org/packages/arrilot/laravel-widgets)[![Build Status](https://camo.githubusercontent.com/0c37b61a251eb59721f8d1bc9059f650d05d90156f3a3f20f14dfbb30e2645d6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f617272696c6f742f6c61726176656c2d776964676574732f6d61737465722e737667)](https://travis-ci.org/arrilot/laravel-widgets)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/d7f3f1ec82783409196b6514c8fc39a23c64ef7d3d290722013baff7fac52432/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617272696c6f742f6c61726176656c2d776964676574732f6d61737465722e737667)](https://scrutinizer-ci.com/g/arrilot/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 arrilot/laravel-widgets`

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

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.

```
