onecentlin / laravel-adminer
Laravel Adminer Database Manager
Installs: 32 935
Dependents: 0
Suggesters: 0
Security: 0
Stars: 183
Watchers: 6
Forks: 25
Open Issues: 4
Requires
- php: >=5.4.0
- illuminate/contracts: ~5.0|~6.0|~7.0|~8.0
- illuminate/routing: ~5.0|~6.0|~7.0|~8.0
- illuminate/support: ~5.0|~6.0|~7.0|~8.0
README
Light weight Adminer database management tool integrated into Laravel 5/6/7/8.
Various database support: MySQL, SQLite, PostgreSQL, Oracle, MS SQL, Firebird, SimpleDB, MongoDB, Elasticsearch, and etc.
v5.0 New Feature:
- enable autologin to database (default:
false
)- customize route prefix (default:
adminer
)
Installation
composer require onecentlin/laravel-adminer
OR
Update composer.json
in require section:
"require": { "onecentlin/laravel-adminer": "^5.0" },
Run:
composer update
Prerequisite
Update config/app.php
'providers' => [ ... Onecentlin\Adminer\ServiceProvider::class, ];
Setup Access Permission
Laravel 5.2 and above
Setup for middleware group supported for Laravel 5.2 above
Modify app/Http/Kernel.php
file with adminer in $middlewareGroups
protected $middlewareGroups = [ ... 'adminer' => [ \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, // you may create customized middleware to fit your needs // example uses Laravel default authentication (default protection) \Illuminate\Auth\Middleware\Authenticate::class, ], ];
Publish config and theme file
php artisan vendor:publish --provider="Onecentlin\Adminer\ServiceProvider"
This action will copy two files:
config/adminer.php
- Adminer config filepublic/adminer.css
- Adminer theme file
config file: config/adminer.php
If you only want to config autologin feature, you may just add below content to config/adminer.php
file.
<?php return [ 'autologin' => false, 'route_prefix' => 'adminer', ]
ATTENSION: Please only enable autologin with authenticated protection.
theme file: public/adminer.css
You may download adminer.css
from Adminer or create custom style, and place it into public
folder.
Access adminer
Open URL in web browser
http://[your.domain.com]/adminer
Remarks
Due to function name conflicts of Laravel 5 and Adminer, adminer.php file
functions cookie()
, redirect()
and view()
are prefixed with adm_
prefix.
Inspired by miroc