onecentlin/laravel-adminer is a Laravel package for laravel adminer database manager.
It currently has 261 GitHub stars and 560.117 downloads on Packagist (latest version 8.0.2).
Install it with composer require onecentlin/laravel-adminer.
Discover more Laravel packages by onecentlin
or browse all Laravel packages to compare alternatives.
Last updated
Light weight Adminer database management tool integrated into Laravel 5 and above.
Various database support: MySQL, SQLite, PostgreSQL, Oracle, MS SQL, Firebird, SimpleDB, MongoDB, Elasticsearch, and etc.
Notice: if you are using plugins, please check namespace with
Adminer.
Make life easier with minimized package setup =)
middleware (default value: auth)ADMINER_ENABLEDADMINER_AUTO_LOGINADMINER_ROUTE_PREFIXcomposer require onecentlin/laravel-adminer
OR
Update composer.json in require section:
"require": {
"onecentlin/laravel-adminer": "^7.0"
},
Run:
composer update onecentlin/laravel-adminer
Laravel auto package discovery feature added since package v6.0, you may skip this step.
Update config/app.php
'providers' => [
...
Onecentlin\Adminer\ServiceProvider::class,
];
php artisan vendor:publish --provider="Onecentlin\Adminer\ServiceProvider"
This action will copy two files and one folder:
config/adminer.php - Adminer config filepublic/adminer.css - Adminer theme fileresources/plugins - Adminer plugins directoryconfig/adminer.php<?php
return [
'enabled' => env('ADMINER_ENABLED', true),
'autologin' => env('ADMINER_AUTO_LOGIN', false),
'route_prefix' => env('ADMINER_ROUTE_PREFIX', 'adminer'),
'middleware' => 'auth',
'plugins' => [],
];
ATTENSION: Please only enable autologin with authenticated protection.
public/adminer.cssYou may download adminer.css from Adminer or create custom style, and place it into public folder.
Package v6.0 allow customized middleware config, you may skip this step or modify to fit your needs.
Since Laravel v11 remove Kernel.php, the middleware setup point to bootstrap/app.php
Add your middleware group in withMiddleware section:
return Application::configure(basePath: dirname(__DIR__))
->withProviders()
->withRouting()
->withMiddleware(function (Middleware $middleware) {
// [SETUP HERE] Adminer Middleware group
$middleware->group('adminer', [
\Illuminate\Cookie\Middleware\EncryptCookies::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\Auth\Middleware\Authenticate::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
Setup for middleware group supported for Laravel 5.2 above (~v10)
Modify config/adminer.php : 'middleware' => 'adminer',
Modify app/Http/Kernel.php file with adminer in $middlewareGroups
protected $middlewareGroups = [
...
'adminer' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Session\Middleware\StartSession::class,
// TODO: you may create customized middleware to fit your needs
// example uses Laravel default authentication (default protection)
\Illuminate\Auth\Middleware\Authenticate::class,
],
];
Drop your plugin files in resources/adminer/plugins
Modify config/adminer.php : 'plugins' => [] by adding the name of the plugin class and any argument required
return [
...
'plugins' => [
'PluginClassNameWithoutArguments',
'PluginClassNameWithArgument' => 'argument_value',
'PluginClassNameWithMultipleArguments' => ['arg1', 'arg2', ...],
],
];
Open URL in web browser
http://[your.domain.com]/adminer

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