PHPackages                             artisancms/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. artisancms/widgets

ActiveLibrary

artisancms/widgets
==================

A powerful alternative to view composers. Asynchronous widgets, reloadable widgets, console generator, caching - everything you can think of.

3.6.2(9y ago)1631MITPHPPHP &gt;=5.5.9

Since Jan 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/artisancms/widgets)[ Packagist](https://packagist.org/packages/artisancms/widgets)[ Docs](https://github.com/artisancms/widgets)[ RSS](/packages/artisancms-widgets/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (6)Versions (57)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/dabc87291ea4e81fbb6ee3d3ff83f2436fa7febfce498e0d9f4ead2a0e402a95/68747470733a2f2f706f7365722e707567782e6f72672f6172746973616e636d732f776964676574732f762f737461626c652e737667)](https://packagist.org/packages/artisancms/widgets/)[![Total Downloads](https://camo.githubusercontent.com/d67744970e2c6ae8153c0c6223312e6f3c620fbf9372202319726d1bd01d7d06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172746973616e636d732f776964676574732e7376673f7374796c653d666c6174)](https://packagist.org/packages/artisancms/widgets)[![Build Status](https://camo.githubusercontent.com/bde1cb1f5287ab59a734f4965b4e997d690a1c725bde4089c89ec8a1a132b5cb/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6172746973616e636d732f776964676574732f6d61737465722e7376673f7374796c653d666c6174)](https://travis-ci.org/artisancms/widgets)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/c46ca9463779cd1c03ce84801060da8a2991c345ad60a9e2b4b2f6f9a8b153d8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746973616e636d732f776964676574732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/artisancms/widgets/)

\#Widgets for Laravel

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

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

[](#installation)

1. Run `composer require artisancms/widgets`
2. Register a service provider in the `app.php` configuration file

```

```

3. Add some facades here too. If you prefer custom blade directives to facades you can skip this step.

```

```

Usage
-----

[](#usage)

Let's consider 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.

```
