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

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

lkozlova/widgets
================

The simple Widgets Package for Laravel

1.0.2(6y ago)0532PHPPHP &gt;=7.1.3

Since Sep 27Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (4)Used By (0)

Widgets
=======

[](#widgets)

**The package is in development now!!!**

This is the simple Widgets package for Laravel. It allows to create interface elements using OOP.

---

HtmlWidget
----------

[](#htmlwidget)

It is the widget for creating HTML.

### Generating tags

[](#generating-tags)

To generate HTML tag you should to call method *tag()* of the *HtmlWidget* class:

```
HtmlWidget::tag('p');
```

And then we`ll get this HTML:

```

```

The *tag()* can get config array which allow to add some attributes and values:

```
HtmlWidget::tag('button',[
    'params' => [
        'class' => 'btn',
    ],
    'value' => 'Ok',
]);
```

The result HTML:

```
Ok
```

#### Composite tags

[](#composite-tags)

The Widgets return the string value which belong to integrated Laravel class Illuminate\\Support\\HtmlString. And then You can place the Widget to value of another Widget. For example:

```
{{HtmlWidget::tag('form', [
        'params' => [
            'class' => 'form-inline',
            'method' => 'post',
            'action' => '/users/login',
            'enctype' => 'multipart/form-data',
        ],
        'value' => csrf_field().
                   HtmlWidget::tag('input', [
                       'params' => [
                           'name' => 'password',
                       ]
                   ]).
                   HtmlWidget::tag('button', [
                       'params' => [
                            'type' => 'submit',
                            'class' => 'btn',
                       ],
                       'value' => 'Login'
                   ]),
])}}
```

The result HTML:

```

    Login

```

As you may have noticed the Widgets are connected by a concatenation sign '.'.

#### Simple tags

[](#simple-tags)

If you don`t want to make the closed tag or It is unprofitably for you to use the composite tags you can give the *false*argument to the method:

```
{{HtmlWidget::tag('form', [
    'params' => [
        ...
        ...
    ],
],false)}}
@csrf
...
...
{{HtmlWidget::tag('/form')}}
```

---

TableWidget
-----------

[](#tablewidget)

This Widget allow to create the table using yours models and collections. The Widget is very simple and flexible. It doesn`t restrict you by Laravels models and collections to giving you opportunity to use your own objects. To create the table use method *table()*:

```
{{TableWidget::table([
    'params' => [
        'class' => 'table  table-striped',
    ],
    'columns' => [
        'id',
        'status',
        'error_message',
        'event',
    ],
], $collection)}}
```

To generate the table you should to pass the collections properties to the config array. The columns will be named as these properties:

```

            id
            status
            error_message
            event

    ...
    Your collections values
    ...

```

If you want to name your column otherwise, you can do it:

```
{{TableWidget::table([
    'columns' => [
        'id',
        'status',
        [
            'label' => 'Error',
            'attribute' => 'error_message',
        ],
        'event',
    ],
], $collection)}}
```

You can also add any string instead of an attribute or even string which will containing an attribute. This is especially useful if you want to use some widget inside the table. To do that you should to use *value* instead of *attribute* and pass the array *value =&gt; \[(string)$value, (array)$attributes\]*. The dynamic variable you write like this: *.'attribute'*.
Look for example:

```
{{TableWidget::table([
    'columns' => [
        [
            'label' => '',
            'value' => [
                HtmlWidget::tag('input', [
                    'params' => [
                        'type' => 'checkbox',
                        'value' => ".'id_value'"
                    ]
                ]),
                [
                    'id_value' => 'id',
                ]
            ]
        ],
        'status',
        [
            'label' => 'Error',
            'attribute' => 'error_message',
        ],
        'event',
    ],
], $collection)}}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~58 days

Total

3

Last Release

2304d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92e0cd75d109f348295958c52177e5aadf3bf83f9a038a0eec07f12d47d987cd?d=identicon)[LKozlova](/maintainers/LKozlova)

---

Top Contributors

[![LKozlova](https://avatars.githubusercontent.com/u/55795003?v=4)](https://github.com/LKozlova "LKozlova (1 commits)")

---

Tags

laravelwidgets

### Embed Badge

![Health badge](/badges/lkozlova-widgets/health.svg)

```
[![Health](https://phpackages.com/badges/lkozlova-widgets/health.svg)](https://phpackages.com/packages/lkozlova-widgets)
```

###  Alternatives

[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M339](/packages/yajra-laravel-datatables-oracle)[cknow/laravel-money

Laravel Money

1.0k4.3M22](/packages/cknow-laravel-money)[livewire/flux

The official UI component library for Livewire.

9385.0M86](/packages/livewire-flux)[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)

PHPackages © 2026

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