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. [Admin Panels](/categories/admin)
4. /
5. administrcms/listview

ActiveLibrary[Admin Panels](/categories/admin)

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

0.2.4(6y ago)040721PHPPHP &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 3w ago

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

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 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

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

2433d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/909813?v=4)[Miroslav Vitanov](/maintainers/mirovit)[@mirovit](https://github.com/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.0k24.7M203](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M916](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.6M217](/packages/backpack-crud)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

29019.5k3](/packages/sebastienheyd-boilerplate)[pimcore/studio-backend-bundle

Pimcore Studio Backend Bundle

20171.5k14](/packages/pimcore-studio-backend-bundle)[printnow/laravel-admin

Dcat admin 永久分叉版 / 支持 Laravel 10-13, PHP 版本限制 &gt;= 8.1（支持 PHP 8.5）

472.4k](/packages/printnow-laravel-admin)

PHPackages © 2026

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