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

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

indatus/widgets
===============

04PHP

Since Dec 30Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Widgets Library
===============

[](#widgets-library)

A helper library that includes methods for generating the HTML for labels, select fields, text fields, links, and tables.

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

[](#installation)

### With Composer

[](#with-composer)

**Add the following to your composer.json then run composer install**

```
{
    "require": {
        "indatus/widgets": "dev-master"
    }
}
```

**Register the service provider in `app/config/app.php`**

```
    [...]
    'providers' => array(
        [...]
        'Illuminate\View\ViewServiceProvider',
        'Illuminate\Workbench\WorkbenchServiceProvider',
        'Indatus\Widgets\WidgetsServiceProvider'
    ),
    [...]
```

Widget Gallery
--------------

[](#widget-gallery)

### Table

[](#table)

Tables can be created from multi-dimentional arrays. The keys will serve as the titles to be displayed in the table header. Additional options may be passed in the options parameter to be applied to the table element.

**Data in controller passed to the view.**

```
    $data = [
        ['name' => 'Alex', 'occupation' => 'Engineer'],
        ['name' => 'Judy', 'occupation' => 'Analyst'],
        ['name' => 'Pam', 'occupation' => 'Coach']
    ];

    $options = ['class' => 'table'];
```

**Using the table generator inside of the blade template.**

```
    {{ Indatus\Widgets\Table::generate($data, $options) }}
```

**The resulting HTML.**

```

                        Name
                        Occupation

                        Alex
                        Engineer

                        Judy
                        Analyst

                        Pam
                        Coach

```

### Select

[](#select)

**Data in controller passed to the view.**

```
    $select = [
        'Red' => 1,
        'Orange' => 2,
        'Yellow' => 3,
        'Green' => 4,
        'Blue' => 5,
        'Indigio' => 6,
        'Violet' => 7
    ];

    $selected = 5; // Used to set what option will be selected.
```

**Using the select generator inside of the blade template.**

```
{{ Indatus\Widgets\Select::generate($select, $selected) }}
```

**The resulting HTML**

```

            Red
            Orange
            Yellow
            Green
            Blue
            Indigio
            Violet

```

### Label and Input

[](#label-and-input)

**Using the label and input generator inside of the blade template.**

```
    {{ Indatus\Widgets\Label::generate('Email', 'email', ['class' => 'loud']) }}
    {{ Indatus\Widgets\TextField::generate('email', null, ['class' => 'email']) }}
    {{ Indatus\Widgets\TextField::generate('name', 'Steve') }}
```

**The resulting HTML**

```
    Email

```

### Link

[](#link)

**Using the link generator inside of the blade template.**

```
    {{ Indatus\Widgets\Link::generate('Google', 'http://google.com/', ['class' => 'outbound']) }}
```

**The resulting HTML**

```
    Google
```

### Assets

[](#assets)

**To publish this package's assets to run the artisan publish command targeting this package.**

```
    php artisan asset:publish indatus/widgets
```

**Then to include the assets use the following inside of your templates**

```
    {{ Indatus\Widgets\Asset::scripts() }}
    {{ Indatus\Widgets\Asset::styles() }}
```

**The resulting HTML**

```

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/a43d7bacdcf317a857946a03368f9d24b9bb2200f11c50dab219942a0705a27c?d=identicon)[jtrespalacios](/maintainers/jtrespalacios)

### Embed Badge

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

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

###  Alternatives

[johnpbloch/wordpress

WordPress is open source software you can use to create a beautiful website, blog, or app.

6079.5M471](/packages/johnpbloch-wordpress)[phstc/jquery-dateformat

jQuery Plugin to format Date outputs using JavaScript.

67622.3k1](/packages/phstc-jquery-dateformat)[typo3/cms-form

TYPO3 CMS Form - Flexible TYPO3 frontend form framework that comes with a backend editor interface.

147.1M185](/packages/typo3-cms-form)

PHPackages © 2026

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