PHPackages                             administrcms/listview - 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. administrcms/listview

ActiveLibrary

administrcms/listview
=====================

0.2.4(6y ago)04072PHPPHP &gt;=5.5.9

Since Oct 10Pushed 5y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (17)Used By (0)

ListView package for AdministrCMS
=================================

[](#listview-package-for-administrcms)

Although it is written to work with the Administr package, you can use this one as a standalone with Laravel &gt;= 5.2.

It is still a work-in-progress.

Installation
============

[](#installation)

Using [Composer](https://getcomposer.org/):

```
composer require administrcms/listview

```

Add the service provider:

```
\Administr\ListView\ListViewServiceProvider::class,
```

What it does
============

[](#what-it-does)

It creates a table representation of your data.

Usage
=====

[](#usage)

```
// The datasource can be an array
$data = [
    ['id' => 1, 'name' => 'test 1'],
    ['id' => 2, 'name' => 'test 2'],
];

// Collection of Eloquent models
$data = User::all();

// Paginated result from a model,
// in this case it will display the pagination
$data = User::paginate(20);

$listView = new ListView(
    $data
);

// You can pass options with the magical setter,
// which will be translated in table attributes
$listView->class = 'table table-bordered table-hover';

// Defining a field
// text is a type which is dynamically set using the magic __call method.
//
// It will look for a field definition
// and if it fails, it will use simple text representation.
//
// Available fields are text, boolean, date, datetime, time.
// Date and time formats can be modified from the config file.
$listView
    ->text('id', '#')
    ->text('name', 'Name')
    ->text('created_at', 'Created');

// or chained:
$listView
    ->text('id', '#')
    ->text('name', 'Name')
    ->text('created_at', 'Created');

// You can set formatters on each column.
// This allows you to manipulate the output value of the column.
// It is possible to pass multiple formatters to a column.
// In this example - add path to the value, if you are not
// keeping the whole path in db. Put an image tag instead of plain text.
// Possible values are a Closure, path to formatter class
// that implements the Administr\ListView\Contracts\Formatter contract,
// string that is mapped to a formatter class in the config file administr.listview
// and an array of all above as well as multiple parameters to the method format
$listView
    ->text('logo_img', 'Logo', function(Column $column, array $row){
        $column->format(function(array $row){
                return "path/to/file/{$row['logo_img']}";
            }, 'image')
            ->format(SomeCustomFormatter::class);
    });

// Action columns

$listView
    ->actions('Actions column label', function(Actions $actions) {
        // Global action
        $actions
            ->action('add', 'Add')
            ->setGlobal()
            ->icon('fa fa-plus')
            ->url( route('resource.create') );

        // Context action
        // For context actions which require value for the row,
        // you can use the define method, which accepts a Closure
        // that has two parameters - the Action instance and an array
        // with the data of the current row - in the example - id, name.
        $actions
            ->action('edit', '')
            ->icon('fa fa-edit')
            ->define(function(Action $action, array $item) {
                $action->url(route('resource.edit', [$item['id']]));
            });
    });

// Render the table with data
$listView->render();

// Getting the global actions
$listView->getActions('global');
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.3% 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 ~74 days

Recently: every ~174 days

Total

16

Last Release

2388d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51dc58bbb0391063331e1b4fbe35819833c3875899f17f91ed7f254a22b6d4aa?d=identicon)[mirovit](/maintainers/mirovit)

---

Top Contributors

[![mirovit](https://avatars.githubusercontent.com/u/909813?v=4)](https://github.com/mirovit "mirovit (144 commits)")[![Kaukov](https://avatars.githubusercontent.com/u/20661820?v=4)](https://github.com/Kaukov "Kaukov (4 commits)")

### Embed Badge

![Health badge](/badges/administrcms-listview/health.svg)

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

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k21.5M156](/packages/laravel-octane)[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M718](/packages/statamic-cms)[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)

PHPackages © 2026

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