How to install Adminer in Laravel application

When accessing database, command line access need skill and you need to write full query. You might needed GUI based database system. Either you can install Workbench, SQLPro database softwares or browser based like phpMyAdmin or Adminer.

Adminer is simple and lightweight database management tool written in PHP. It is simple one php file, so you can easily use and transport. Adminer can be used for MySQL, MongoDB, MariaDB, MS SQL, PostgreSQL, SQLite, Oracle and others databases using third party plugin. You can simply download and put the Adminer.php file in your server and access databases using file.

Suppose you want to access Adminer tool in your Laravel framework, then you can also integrate it using Laravel Adminer Database Manager. Here is few things to use Adminer in Laravel application.

First install package in Laravel application using Composer command.

composer require onecentlin/laravel-adminer

In config/app.php file, add the provider class in 'providers' array.

'providers' => [

Now add adminer middleware group in app/Http/Kernel.php. You can add your custom middleware instead of Authenticate.

protected $middlewareGroups = [
    'adminer' => [
        // use laravel default login or add your custom here

Publish the package configuration file using artisan command.

php artisan vendor:publish --provider="Onecentlin\Adminer\ServiceProvider"

This will copy config/adminer.php and public/adminer.css file.

In config/adminer.php file, you can enable or disable autologin and set route_prefix.


return [
    'autologin' => false,
    'route_prefix' => 'adminer',

You can download theme and set it in public/adminer.css file.

Access adminer

In your browser, you can access Adminer using route.