aranyasen / laravel-adminer
Adminer (by Jakub Vrana) wrapper for Laravel 9+
Installs: 75 197
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 3
Forks: 10
Open Issues: 2
Requires
- php: >=8.1
- illuminate/routing: >=v9
- illuminate/support: >=v9
Requires (Dev)
- orchestra/testbench: ^v8.12.1
- phpunit/phpunit: ^10.3.5
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2024-11-06 17:24:07 UTC
README
Introduction
Laravel 9+ wrapper for Adminer. Adminer is a fast single-file database manager/explorer tool written by Jakub Vrana. It's a great replacement for PhpMyAdmin (also supports PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB).
This package is meant to be used with Laravel as an in-built database manager/explorer. It comes with support for Adminer plugins and themes, which super-charges an already powerful tool.
This package is inspired by: miroc/Laravel-Adminer. The reason to add this package is to keep it up-to-date with Adminer, add plugin support and a test suite (TBD).
Database view with default theme
Table view with 'rmsoft' theme
Plugins Included
Tables-filter
Adds ability to do (fuzzy) search on table names. It's especially useful when you have a large set of tables
Installation
To use this package, run:
composer require aranyasen/laravel-adminer
To use Adminer to Laravel routes (e.g. /adminer), update routes/web.php
:
To autologin Adminer with Laravel default connection:
Route::any('adminer', '\Aranyasen\LaravelAdminer\AdminerAutologinController@index');
If you want to manually provide credentials on the UI instead:
Route::any('adminer', '\Aranyasen\LaravelAdminer\AdminerController@index');
Of course, you can add any middleware of your choice to restrict usage:
Route::any('adminer', '\Aranyasen\LaravelAdminer\AdminerAutologinController@index') ->middleware(['admin']);
Disabling CSRF Middleware
Adminer doesn't work with VerifyCsrfToken middleware, so it has to be disabled on its route.
In VerifyCsrfToken.php
disable CSRF by adding adminer route to $except
array:
protected $except = [ 'adminer' ];
To add plugins
Adminer supports a host of plugins. See CONTRIBUTING to add a new plugin
To add a new theme:
Download your favorite theme in public/
, e.g.:
$ wget https://raw.githubusercontent.com/vrana/adminer/master/designs/hever/adminer.css