Download the PHP package vulcanphp/hyper-admin without Composer
On this page you can find all versions of the php package vulcanphp/hyper-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vulcanphp/hyper-admin
More information about vulcanphp/hyper-admin
Files in vulcanphp/hyper-admin
Package hyper-admin
Short Description Simple Admin Panel for Hyper MVT Framework
License MIT
Informations about the package hyper-admin
Hyper Admin - README
Hyper Admin
Admin Panel for Hyper MVT Framework
Introduction
Hyper Admin is a simple and powerful admin panel designed for the Hyper MVT framework. It offers a user-friendly interface for managing your application's data, similar to Django's contrib admin panel.
Installation
It is recommended to use Composer to install Hyper Admin.
To install, run the following command:
Setup Hyper Admin
Register Hyper Admin in Your Application
To set up Hyper Admin, you need to merge it with your application's bootstrap file.
Open your app/bootstrap.php
file and add the following code:
Configure Admin Settings
Create a new file app/web/admin.php
and configure your admin settings. This file will define the users, models, menus, and settings for your admin panel.
Example configuration:
ModelView Usage
When registering models in the admin panel, you need to configure additional model settings to customize their behavior and appearance.
Basic Model Registration
For a basic model registration, simply include the model class:
Customized Model Registration
For a more customized setup, use the modelView
class. Below is a complete example:
Explanation of modelView
Parameters:
model
: The model class to be managed.name
: Singular name for the model (e.g., 'student').name_plural
: Plural name for the model (e.g., 'students').model_name
: Unique name for the model as id.fields
: Fields to be displayed in the admin panel.search
: Fields to be included in the search functionality.filter
: Filters to apply (e.g., gender filter with options).with
: Relationships to include (e.g., 'department').where
: Conditions to apply (e.g., only include non-deleted records).order
: Default ordering of records (e.g., 'id DESC').actions
: Custom actions available for the model (e.g., export functionality).