PHPackages                             abno/abncrud - 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. abno/abncrud

ActiveLibrary[Admin Panels](/categories/admin)

abno/abncrud
============

Abno Cms CRUD

1.15.31(5mo ago)0154MITPHP

Since Jul 26Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/aman5537jains/abncrud)[ Packagist](https://packagist.org/packages/abno/abncrud)[ RSS](/packages/abno-abncrud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (39)Used By (0)

ABN CRUD (Laravel Package)
--------------------------

[](#abn-crud-laravel-package)

ABN CRUD is a Laravel package that lets you scaffold powerful CRUD screens quickly, auto-generate forms from your database schema, and customize fields with reusable UI components.

### Key features

[](#key-features)

- **Zero-boilerplate CRUD**: RESTful routes, index table, create/edit forms, delete and status toggle.
- **Auto form generation** from DB column types, with sensible defaults.
- **Config-driven customization** using `config/crud.php` per-field overrides and view components.
- **Artisan generator** to create a model and CRUD controller from a table: `php artisan make:abncrud`.
- **Publishable assets** (JS, etc.) and packaged views.

1) Installation
---------------

[](#1-installation)

1. Require the package (e.g., via path/VCS or Packagist):

```
composer require abno/abncrud
```

2. The service provider is auto-discovered via composer extra. If you disable discovery, register it manually in `config/app.php`:

```
Aman5537jains\AbnCmsCRUD\AbnCmsCRUDServiceProvider::class,
```

2) Publish config and assets
----------------------------

[](#2-publish-config-and-assets)

```
# Publish config to config/crud.php
php artisan vendor:publish --provider="Aman5537jains\AbnCmsCRUD\AbnCmsCRUDServiceProvider" --tag=config

# Publish public assets to public/vendor/abncrud
php artisan vendor:publish --provider="Aman5537jains\AbnCmsCRUD\AbnCmsCRUDServiceProvider" --tag=assets
```

Assets will be available under `public/vendor/abncrud`.

3) Views
--------

[](#3-views)

The package registers views under the namespace `AbnCmsCrud`.

- To use the package views directly, set the controller theme to `AbnCmsCrud::`.
- Or copy/override views into your app `resources/views/crud/*` and keep `theme` empty.

Example inside your CRUD controller:

```
protected $theme = 'AbnCmsCrud::'; // use packaged views
```

Packaged views include table, form and single-view screens.

4) Quick start (generator)
--------------------------

[](#4-quick-start-generator)

Generate model and controller for a given table:

```
php artisan make:abncrud posts

# Options (optional directories if you don’t use defaults):
php artisan make:abncrud posts --modelPath=app/Domain/Blog/Models --controllerPath=app/Http/Controllers/Admin
```

What you get:

- Model at `app/Models/Post.php` (or the path you specified)
- Controller at `app/Http/Controllers/PostController.php` (or the path you specified)

5) Define your CRUD controller
------------------------------

[](#5-define-your-crud-controller)

Your controller should extend the base `CrudController`, set the module slug and model, and optionally the title and theme.

```
namespace App\Http\Controllers\Admin;

use Aman5537jains\AbnCmsCRUD\CrudController;

class PostsController extends CrudController
{
    public static $module = 'posts';              // URL + route name prefix
    public static $moduleTitle = 'Posts';         // UI headings
    public $model = \App\Models\Post::class;    // Eloquent model
    protected $theme = 'AbnCmsCrud::';            // use packaged views (optional)
}
```

6) Register routes
------------------

[](#6-register-routes)

There are two ways to register routes.

- Minimal (controller self-register):

```
// routes/web.php
\App\Http\Controllers\Admin\PostsController::resource();
```

This will register:

- Resource routes for `posts`
- Extra GET routes: `/posts/changeStatus/{id}` and `/posts/{id}/delete`
- Advanced (explicit using RouteService):

```
use Aman5537jains\AbnCmsCRUD\Lib\RouteService;
use App\Http\Controllers\Admin\PostsController;

RouteService::resource('posts', PostsController::class, function ($r) {
    // Add optional custom routes inside the posts group
    // $r->get('export');
});
```

The package also exposes a helper route for component rendering:

```
GET /component-render  (named: component-render)

```

7) How forms and tables are built
---------------------------------

[](#7-how-forms-and-tables-are-built)

ABN CRUD auto-inspects your model’s table to guess field components:

- `int`, `decimal` → number input
- `varchar` → text input (or file if the column name contains `file`)
- `enum` → select with enum options
- `date`, `time`, `datetime` → corresponding inputs
- `text` → textarea

You can override per-field behavior via `config/crud.php`.

8) Configure fields (config/crud.php)
-------------------------------------

[](#8-configure-fields-configcrudphp)

When you publish config, you’ll get `config/crud.php` similar to:

```
return [
    'view_fields' => [
        // 'status' => [ 'class' => \Aman5537jains\AbnCmsCRUD\Components\TextComponent::class, 'config' => [] ],
    ],
    'form_fields' => [
        // 'status' => [ 'class' => \Aman5537jains\AbnCmsCRUD\Components\InputComponent::class, 'config' => ['type' => 'select', 'options' => ['1' => 'Active', '0' => 'Inactive']] ],
    ],
    'components' => [
        // Optional: map friendly names to components
    ],
];
```

Example: humanize a `branch_id` in the table view and render images:

```
'view_fields' => [
    'branch_id' => [
        'class' => \Aman5537jains\AbnCmsCRUD\Components\TextComponent::class,
        'config' => [
            'label' => 'Branch',
            'beforeRender' => function ($component) {
                $component->setValue(optional(\App\Models\Branch::find($component->getValue()))->branch_name);
            }
        ]
    ],
    'image' => [ 'class' => \Aman5537jains\AbnCmsCRUD\Components\ImageComponent::class, 'config' => [] ],
    'thumb' => [ 'class' => \Aman5537jains\AbnCmsCRUD\Components\ImageComponent::class, 'config' => ['height' => 50, 'width' => 50] ],
],
```

Example: form defaults and select options:

```
'form_fields' => [
    'status' => [
        'class' => \Aman5537jains\AbnCmsCRUD\Components\InputComponent::class,
        'config' => [ 'type' => 'select', 'value' => '1', 'options' => ['1' => 'Active', '0' => 'Inactive'] ]
    ],
    'image' => [ 'class' => \Aman5537jains\AbnCmsCRUD\Components\FileInputComponent::class, 'config' => [] ],
],
```

9) Permissions
--------------

[](#9-permissions)

The base controller checks permissions via `getPermissions()` which you can implement on your controller. Returning `'superadmin'` or a map containing `"{module}___{action}"` keys allows the action. For example:

```
public function getPermissions()
{
    // Allow everything for demo
    return 'superadmin';
}
```

Actions checked: `view`, `add`, `edit`, `delete`, and `status`.

10) Endpoints generated
-----------------------

[](#10-endpoints-generated)

Given `public static $module = 'posts'`, the following will be registered:

- `GET /posts` → index (search + table)
- `GET /posts/create` → create form
- `POST /posts` → store
- `GET /posts/{slug}` → show (single view)
- `GET /posts/{slug}/edit` → edit form
- `PUT/PATCH /posts/{slug}` → update
- `DELETE /posts/{slug}` → destroy
- `GET /posts/changeStatus/{id}` → toggle status
- `GET /posts/{id}/delete` → delete

11) Advanced: live updates in forms
-----------------------------------

[](#11-advanced-live-updates-in-forms)

Forms support live updates for dependent fields. Emit `live_listners`/`live_emitter` in the request; the controller will re-render target fields and return HTML snippets in JSON. See `CrudController::liveUpdate()` for details.

12) Component reference (selected)
----------------------------------

[](#12-component-reference-selected)

Common components you can use in `config/crud.php` or when customizing builders:

- `Aman5537jains\AbnCmsCRUD\Components\InputComponent` (types: text, number, date, time, datetime, textarea, select)
- `Aman5537jains\AbnCmsCRUD\Components\FileInputComponent`
- `Aman5537jains\AbnCmsCRUD\Components\ImageComponent`
- `Aman5537jains\AbnCmsCRUD\Components\TextComponent`
- `Aman5537jains\AbnCmsCRUD\Components\LinkComponent`
- `Aman5537jains\AbnCmsCRUD\Components\ChangeStatusComponent`
- `Aman5537jains\AbnCmsCRUD\Components\MultiComponent`
- `Aman5537jains\AbnCmsCRUD\Components\SubmitButtonComponent`

13) Example end-to-end
----------------------

[](#13-example-end-to-end)

1. Migration with a `slug` and `status` column (recommended by defaults):

```
Schema::create('posts', function (Blueprint $table) {
    $table->id();
    $table->string('title');
    $table->text('body');
    $table->string('slug')->unique();
    $table->enum('status', ['0','1'])->default('1');
    $table->timestamps();
});
```

2. Model: `App\Models\Post`
3. Controller:

```
class PostsController extends CrudController
{
    public static $module = 'posts';
    public static $moduleTitle = 'Posts';
    public $model = \App\Models\Post::class;
    protected $theme = 'AbnCmsCrud::';

    public function getPermissions() { return 'superadmin'; }
}
```

4. Routes:

```
\App\Http\Controllers\Admin\PostsController::resource();
```

Visit `/posts` to use the CRUD UI.

14) Helper route for components
-------------------------------

[](#14-helper-route-for-components)

The package registers:

```
GET /component-render  (named: component-render)

```

It returns rendered component HTML based on the current request and is used internally for dynamic UI behaviors.

15) Support
-----------

[](#15-support)

- Author: aman ()
- License: MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance72

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Recently: every ~35 days

Total

38

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d6f9b57274fea5ce9a42013d48367a3dc7aca046f1beca91ee9bd9e527a64ac?d=identicon)[Readerstacks](/maintainers/Readerstacks)

---

Top Contributors

[![aman5537jains](https://avatars.githubusercontent.com/u/8058839?v=4)](https://github.com/aman5537jains "aman5537jains (24 commits)")

---

Tags

crud

### Embed Badge

![Health badge](/badges/abno-abncrud/health.svg)

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

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.4M207](/packages/backpack-crud)[appzcoder/crud-generator

Laravel CRUD Generator

1.4k581.4k7](/packages/appzcoder-crud-generator)[friendsofcake/crud

CakePHP Application development on steroids - rapid prototyping / scaffolding &amp; production ready code - XML / JSON APIs and more

3751.4M25](/packages/friendsofcake-crud)[laravelrus/sleepingowl

Administrative interface builder for Laravel.

810219.6k3](/packages/laravelrus-sleepingowl)[ibex/crud-generator

Laravel CRUD Generator

706235.0k](/packages/ibex-crud-generator)[backpack/pagemanager

Create admin panels for presentation websites on Laravel, using page templates and Backpack\\CRUD.

371522.6k6](/packages/backpack-pagemanager)

PHPackages © 2026

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