PHPackages                             unisharp/laravel-widgetify - 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. unisharp/laravel-widgetify

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

unisharp/laravel-widgetify
==========================

help dealing with data in partial view with laravel.

112PHP

Since Nov 10Pushed 10y ago4 watchersCompare

[ Source](https://github.com/UniSharp/laravel-widgetify)[ Packagist](https://packagist.org/packages/unisharp/laravel-widgetify)[ RSS](/packages/unisharp-laravel-widgetify/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Widget generator for Laravel
============================

[](#widget-generator-for-laravel)

- Help you get partial views as widgets

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

[](#installation)

1. install package

    ```
        composer require unisharp/laravel-widgetify
    ```
2. edit config/app.php

    service provider :

    ```
        Unisharp\Widget\WidgetServiceProvider::class,
    ```

    class aliases :

    ```
        'Widget' => Unisharp\Widget\WidgetFacade::class,
    ```
3. publish widget template class

    ```
        php artisan vendor:publish --tag=widget_example
    ```

Usage
-----

[](#usage)

```
    Widget::set('side', 'widget-class-name', $args = []]);
    // set widgets with position

    Widget::get('side');
    // get all widgets of a position
```

Example
-------

[](#example)

1. in `App\Widgets\Block.php` :

    ```
        class Block implements WidgetInterface
        {
            public $view = 'home.widgets.side_html';

            public function getData($args)
            {
                return ['html' => \App\Utility::getPageByAlias($args['alias'])];
            }
        }
    ```
2. in `home.widgets.side_html.blade.php` :

    ```
        @if(!empty($html->content))

                {!! $html->content !!}

        @endif
    ```
3. set widgets in in controller :

    ```
        \Widget::set('side', 'block', ['alias' => 'side_top_html']);
        \Widget::set('side', 'facebook');
        \Widget::set('side', 'block', ['alias' => 'side_mid_html']);
        \Widget::set('side', 'subscription');
        \Widget::set('side', 'block', ['alias' => 'side_buttom_html']);
    ```
4. display widgets in view :

    ```
        {!! \Widget::get('side') !!}
    ```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/49773ea5050ec1d004a506cc1e11be08d6e87339120b5d223b8921e3f671153c?d=identicon)[g0110280](/maintainers/g0110280)

![](https://avatars.githubusercontent.com/u/181350?v=4)[Youchen Lee (isacl)](/maintainers/youchenlee)[@youchenlee](https://github.com/youchenlee)

---

Top Contributors

[![streamtw](https://avatars.githubusercontent.com/u/7333171?v=4)](https://github.com/streamtw "streamtw (11 commits)")

### Embed Badge

![Health badge](/badges/unisharp-laravel-widgetify/health.svg)

```
[![Health](https://phpackages.com/badges/unisharp-laravel-widgetify/health.svg)](https://phpackages.com/packages/unisharp-laravel-widgetify)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

291.8k](/packages/webkinder-sproutset)[awkwardideas/switchblade

Extended blade directives for laravel

102.1k](/packages/awkwardideas-switchblade)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
