Download the PHP package abno/abncrud without Composer
On this page you can find all versions of the php package abno/abncrud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package abncrud
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
- 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.phpper-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
-
Require the package (e.g., via path/VCS or Packagist):
- The service provider is auto-discovered via composer extra. If you disable discovery, register it manually in
config/app.php:
2) Publish config and assets
Assets will be available under public/vendor/abncrud.
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 keepthemeempty.
Example inside your CRUD controller:
Packaged views include table, form and single-view screens.
4) Quick start (generator)
Generate model and controller for a given table:
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
Your controller should extend the base CrudController, set the module slug and model, and optionally the title and theme.
6) Register routes
There are two ways to register routes.
- Minimal (controller self-register):
This will register:
- Resource routes for
posts -
Extra GET routes:
/posts/changeStatus/{id}and/posts/{id}/delete - Advanced (explicit using RouteService):
The package also exposes a helper route for component rendering:
7) How forms and tables are built
ABN CRUD auto-inspects your model’s table to guess field components:
int,decimal→ number inputvarchar→ text input (or file if the column name containsfile)enum→ select with enum optionsdate,time,datetime→ corresponding inputstext→ textarea
You can override per-field behavior via config/crud.php.
8) Configure fields (config/crud.php)
When you publish config, you’ll get config/crud.php similar to:
Example: humanize a branch_id in the table view and render images:
Example: form defaults and select options:
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:
Actions checked: view, add, edit, delete, and status.
10) Endpoints generated
Given public static $module = 'posts', the following will be registered:
GET /posts→ index (search + table)GET /posts/create→ create formPOST /posts→ storeGET /posts/{slug}→ show (single view)GET /posts/{slug}/edit→ edit formPUT/PATCH /posts/{slug}→ updateDELETE /posts/{slug}→ destroyGET /posts/changeStatus/{id}→ toggle statusGET /posts/{id}/delete→ delete
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)
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\FileInputComponentAman5537jains\AbnCmsCRUD\Components\ImageComponentAman5537jains\AbnCmsCRUD\Components\TextComponentAman5537jains\AbnCmsCRUD\Components\LinkComponentAman5537jains\AbnCmsCRUD\Components\ChangeStatusComponentAman5537jains\AbnCmsCRUD\Components\MultiComponentAman5537jains\AbnCmsCRUD\Components\SubmitButtonComponent
13) Example end-to-end
1) Migration with a slug and status column (recommended by defaults):
2) Model: App\Models\Post
3) Controller:
4) Routes:
Visit /posts to use the CRUD UI.
14) Helper route for components
The package registers:
It returns rendered component HTML based on the current request and is used internally for dynamic UI behaviors.
15) Support
- Author: aman ([email protected])
- License: MIT