PHPackages                             justinmoh/backpack-helper - 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. [Framework](/categories/framework)
4. /
5. justinmoh/backpack-helper

ActiveLibrary[Framework](/categories/framework)

justinmoh/backpack-helper
=========================

A helper package for Laravel-Backpack CRUD that allows using CRUD components as chained method.

1.3.0(4y ago)1671[4 PRs](https://github.com/justinmoh/backpack-helper/pulls)MITPHPPHP ^7.2.5|^8.0

Since Nov 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/justinmoh/backpack-helper)[ Packagist](https://packagist.org/packages/justinmoh/backpack-helper)[ Docs](https://github.com/justinmoh/backpack-helper)[ RSS](/packages/justinmoh-backpack-helper/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (38)Used By (0)

backpack-helper
===============

[](#backpack-helper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fc9c62af6ea9c3cc241159be5115f4ff7b61ebb5b242d5dcc44a903e68305e8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a757374696e6d6f682f6261636b7061636b2d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justinmoh/backpack-helper)[![Total Downloads](https://camo.githubusercontent.com/d32c75e1712235c589d140b7eb58e6d4839bcb27c7a093f481d8bfc019d7c7cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a757374696e6d6f682f6261636b7061636b2d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justinmoh/backpack-helper)

This package intends to provide a friendlier interface while using `Backpack CRUD`, by makes use of `laravel's facade`.

According to the way `Backpack\Crud` works, this package rely the trailing method to perform the magic. Currently these compulsory trailing methods are:

- `public function toField($extraConfigToBeMerged = []): CrudPanel`
- `public function toColumn($extraConfigToBeMerged = []): CrudPanel`
- `public function toFilter($extraConfigToBeMerged = []): void`

All other methods return the current instance `$this`. In order to perform method chain, refer class source code for api, example:

```
CrudColumn::init(string $label, ?string $name = null, $priority = null): self
CrudField::init(string $label, ?string $name = null, $width = null): self
```

There is a 2-steps plan:

- To include all `Backpack CRUD` columns, fields, and filters
- To merge the helper classes into one.

These is no test written, yet.

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

[](#installation)

Via Composer

```
$ composer require justinmoh/backpack-helper:~0.2
```

Usage
-----

[](#usage)

```
use \JustinMoh\BackpackHelper\CrudHelper;
use \JustinMoh\BackpackHelper\Facades\Columns\DatetimeColumn;
use \JustinMoh\BackpackHelper\Facades\Columns\SelectColumn;
use \JustinMoh\BackpackHelper\Facades\Columns\TextColumn;
use \JustinMoh\BackpackHelper\Facades\Fields\RadioField;
use \JustinMoh\BackpackHelper\Facades\Fields\Select2FromArrayField;
use \JustinMoh\BackpackHelper\Facades\Fields\UploadMultipleField;
use \JustinMoh\BackpackHelper\Facades\Filters\Select2MultipleFilter;
use \JustinMoh\BackpackHelper\Facades\Filters\SimpleFilter;

// ...

protected function setupListOperation()
{
    // a datetime column with priority `1`
    DatetimeColumn::init('Date & Time Check In', 'datetime_check_in', 1)
        ->toColumn();

    // you can also separate the method chains.
    DatetimeColumn::label('Date & Time Check Out')->name('datetime_check_out')
        ->toColumn();

    // auto guessing `name` with `label`
    TextColumn::label('Name')->toColumn();

    // backpack's `select` column type
    SelectColumn::init('Category', 'category_id')
        ->entity('category')->attribute('display_name')->model(\App\Category::class)
        ->toColumn();
}

// ...

protected function setupCreateOperation()
{
    // a field with wrapperAttribute col-md-6 (or col-lg-6 ?)
    UploadMultipleField::init('Attach Documents', 'customer_documents', 6)
        ->toField();

    // an inline yes no radio button, disabled
    RadioField::init('Is Vip')->width(3)->inline()
        ->options(CrudHelper::YES_NO_OPTIONS)
        ->disabled()->toField();

    // select 2
    Select2FromArrayField::init('Room Type', 'room_type_id', 4)->required()
        ->options(\App\RoomType::all()->prepend('')->pluck('name','id')->toArray())
        ->toField();
}

// ...

protected function setupListOperation()
{
    SimpleFilter::init('Only New', 'status_new')
        ->query(function() {
            \CRUD::addClause('onlyNew');
        })->toFilter();

    Select2MultipleFilter::label('Select Room Type(s)')
        ->options(
            function () {
                return \App\RoomType::all()->pluck('name', 'id')->toArray();
            }
        )->query(
            function ($value) {
                \CRUD::addClause('whereInRoomTypes', json_decode($values));
            }
        )->toFilter();
}
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Justin Moh](https://github.com/justinmoh)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity74

Established project with proven stability

 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 ~22 days

Recently: every ~130 days

Total

33

Last Release

1673d ago

Major Versions

0.8.3 → 1.0.02020-05-05

PHP version history (3 changes)0.1.2PHP ^7.3

1.2.2PHP ^7.2.5

1.3.0PHP ^7.2.5|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e21ffc9e4aa71c5644306993e6b13e6a2204caa59ac91e9e0e63574136d112e?d=identicon)[justinmoh](/maintainers/justinmoh)

---

Top Contributors

[![justinmoh](https://avatars.githubusercontent.com/u/11174621?v=4)](https://github.com/justinmoh "justinmoh (34 commits)")

---

Tags

laravellaravel backpackbackpack-helperLaravel-Backpack CRUD

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/justinmoh-backpack-helper/health.svg)

```
[![Health](https://phpackages.com/badges/justinmoh-backpack-helper/health.svg)](https://phpackages.com/packages/justinmoh-backpack-helper)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)

PHPackages © 2026

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