tir/mehr-panel
最新稳定版本:12.7.1
Composer 安装命令:
composer require tir/mehr-panel
包简介
The admin panel for Tir framework
README 文档
README
A Laravel package for managing an admin panel.
Installation
-
Install the package via Composer:
composer require mehr-panel/mehr-panel
-
Publish the configuration file (optional, to customize prefixes):
php artisan vendor:publish --tag=mehr-panel-config
-
Publish assets:
php artisan vendor:publish --tag=mehr-panel-assets --force
-
Publish customization files (optional):
php artisan vendor:publish --tag=mehr-panel-customize
-
Install frontend dependencies:
npm install
-
Build assets for production:
npm run prod
Configuration
To customize the URL prefixes for the admin panel, you can either:
- Edit the
config/mehr-panel.phpfile after publishing it. - Set the
MEHR_PANEL_PREFIXenvironment variable in your.envfile.
Example in .env:
MEHR_PANEL_PREFIX=admin,dashboard
This will make the admin panel accessible at both /admin and /dashboard. If not set, the default prefix is admin.
Configuration File
The config/mehr-panel.php file contains:
<?php return [ 'panel' => [ 'prefix' => array_filter(explode(',', env('MEHR_PANEL_PREFIX', 'admin'))), ], ];
Customization
To override styles, create a custom.scss file in the /admin/assets/ directory after publishing assets.
Routes
The admin panel is accessible at /{prefix} for each prefix defined in the panel.prefix array (default: admin). For example, if MEHR_PANEL_PREFIX=admin,dashboard is set in .env, the admin panel will be available at both /admin and /dashboard.
统计信息
- 总下载量: 1.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-29