Download the PHP package juneszh/alight-admin without Composer
On this page you can find all versions of the php package juneszh/alight-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juneszh/alight-admin
More information about juneszh/alight-admin
Files in juneszh/alight-admin
Package alight-admin
Short Description Alight Admin is a quick admin panel extension based on the Alight framework.
License MIT
Informations about the package alight-admin
Alight-Admin
Alight-Admin is a quick admin panel extension based on the Alight framework.
Features
- No front-end coding required. Built-in Ant Design UI (React) components and driven by PHP interface.
- Quickly build and configure CRUD pages with Table/Form rendering.
- Includes authorization, permissions and user management.
- Customizable Charts displayed in the console by PHP, such as Line, Column, Pie, etc.
Alight Family
| Project | Description |
|---|---|
| Alight | Basic framework built-in routing, database, caching, etc. |
| Alight-Admin | A full admin panel extension based on Alight. No front-end coding required. |
| Alight-Project | A template for beginner to easily create web applications by Alight/Alight-Admin. |
Requirements
PHP 8.3+
Usage
Alight-Admin can be quickly built using Alight-Project.
Creating Project
Initialize Admin
The following commands will build the runtime environment required by Alight-Admin, such as installing composer package, inserting configuration options, creating database tables, and downloading front-end resources. Please make sure the database has been configured.
Try the CRUD
Suppose we already have a database table named admin_user:
| Name | Datatype | Default |
|---|---|---|
| id | SMALLINT | AUTO_INCREMENT |
| account | VARCHAR | |
| password | VARCHAR | |
| name | VARCHAR | |
| VARCHAR | ||
| role_id | TINYINT | 0 |
| status | TINYINT | 1 |
| auth_key | VARCHAR | |
| create_time | TIMESTAMP | CURRENT_TIMESTAMP |
Now, create a php table function under controller. For example:
File: app/controller/admin/Test.php
Then, we will get the table page as:
(In order to make the code more compact, some settings are omitted, such as: column title, status point, etc.)
Next, we go ahead and create a form function:
Then, we will get the form page as:
The last step, configure routing and side menu:
File: config/route/admin.php
File: config/admin/menu.php
The admin_user table now has a complete CRUD interface. See the API list for more information.
Try the Console Charts
Create charts with built-in data.
File: config/admin/console.php
Create charts with api data.
File: config/admin/console.php
File: app/controller/admin/Test.php
File: config/route/admin.php
Finally, we will get the console page as:
API
- Alight\Admin\Table
- ::button()
- ->action()
- ->batch()
- ->color()
- ->column()
- ->expand()
- ->if()
- ->param()
- ->role()
- ->title()
- ->toolbar()
- ->url()
- ->variant()
- ::column()
- ->align()
- ->copyable()
- ->database()
- ->ellipsis()
- ->enum()
- ->fixed()
- ->hide()
- ->html()
- ->role()
- ->search()
- ->sort()
- ->title()
- ->tooltip()
- ->type()
- ->width()
- ::expand()
- ->align()
- ->copyable()
- ->enum()
- ->fixed()
- ->hide()
- ->html()
- ->role()
- ->sort()
- ->title()
- ->tooltip()
- ->type()
- ->width()
- ::statistic()
- ->title()
- ->value()
- ::summary()
- ->avg()
- ->precision()
- ::render()
- ::button()
- Alight\Admin\Form
- ::create()
- ->copy()
- ::field()
- ->button()
- ->confirm()
- ->database()
- ->default()
- ->delete()
- ->disabled()
- ->enum()
- ->grid()
- ->hide()
- ->if()
- ->options()
- ->placeholder()
- ->raw()
- ->readonly()
- ->request()
- ->required()
- ->reset()
- ->role()
- ->rules()
- ->title()
- ->tooltip()
- ->type()
- ::subField() supports the same methods as
::field(). - ::render()
- ::create()
- Alight\Admin\Console
- ::chart()
- ->api()
- ->config()
- ->grid()
- ->role()
- ::chart()
- Alight\Admin\Menu
- ::item()
- ->action()
- ->icon()
- ->key()
- ->role()
- ->url()
- ::subItem()
- ->action()
- ->icon()
- ->key()
- ->role()
- ->url()
- ::build()
- ::item()
Development
Install dependencies and run Composer validation, PHP syntax checks, PHPStan, and the PHPUnit suite:
Use composer lint, composer analyse, or composer test when only one check
is needed. During local development of the Alight family repositories, test
against an unpublished sibling checkout with:
Frontend resources are validated separately:
Credits
- Composer requires
- UI components
License
- MIT license
All versions of alight-admin with dependencies
juneszh/alight Version ^3.0
gregwar/captcha Version ^2.1
symfony/var-exporter Version ^7.4 || ^8.0