tir / mehr-panel
The admin panel for Tir framework
Requires
- tir/crud: *
This package is auto-updated.
Last update: 2026-07-25 11:48:47 UTC
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.