Jump24 - Laravel Developers that Click into Place. Never outsourced. Never offshored. Always exceptional.

Laravel Adminer

Laravel Adminer stats

Downloads
196.7K
Stars
225
Open Issues
8
Forks
44

View on GitHub →

Laravel Adminer Database Manager

Laravel Adminer Database Manager

Light weight Adminer database management tool integrated into Laravel 5/6/7/8/9.

Various database support: MySQL, SQLite, PostgreSQL, Oracle, MS SQL, Firebird, SimpleDB, MongoDB, Elasticsearch, and etc.

v6.0 New Features

Make life easier with minimized package setup =)

  • Enable laravel auto package discovery
  • New config setting: middleware (default value: auth)
  • Enable env variables to setup adminer config
    • ADMINER_ENABLED
    • ADMINER_AUTO_LOGIN
    • ADMINER_ROUTE_PREFIX

Installation

composer require onecentlin/laravel-adminer

OR

Update composer.json in require section:

"require": {
"onecentlin/laravel-adminer": "^6.0"
},

Run:

composer update onecentlin/laravel-adminer

Register package

Laravel auto package discovery feature added since package v6.0, you may skip this step.

Update config/app.php

'providers' => [
...
Onecentlin\Adminer\ServiceProvider::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 file
  • public/adminer.css - Adminer theme file

config file: config/adminer.php

<?php
 
return [
'enabled' => env('ADMINER_ENABLED', true),
'autologin' => env('ADMINER_AUTO_LOGIN', false),
'route_prefix' => env('ADMINER_ROUTE_PREFIX', 'adminer'),
'middleware' => 'auth',
];

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.

Setup Access Permission (Middleware)

Package v6.0 allow customized middleware config, you may skip this step or modify to fit your needs.

Laravel 5.2 and above

Setup for middleware group supported for Laravel 5.2 above

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,
],
];

Access adminer

Open URL in web browser

http://[your.domain.com]/adminer

various database support

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

onecentlin photo

Web Developer, Microsoft MVP 2017-2023

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Onecentlin Laravel Adminer Related Articles

Handle Fluent Values as Arrays with Laravel's array() Method image

Handle Fluent Values as Arrays with Laravel's array() Method

Read article
DirectoryTree Authorization is a Native Role and Permission Management Package for Laravel image

DirectoryTree Authorization is a Native Role and Permission Management Package for Laravel

Read article
Using Route Registrars in your Laravel application image

Using Route Registrars in your Laravel application

Read article
Restructuring a Laravel Controller using Services, Events, Jobs, Actions, and more image

Restructuring a Laravel Controller using Services, Events, Jobs, Actions, and more

Read article
Laravel Roles and Permissions: Gates and Policies Explained image

Laravel Roles and Permissions: Gates and Policies Explained

Read article
E-commerce package for Laravel image

E-commerce package for Laravel

Read article
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit