Package Data | |
---|---|
Maintainer Username: | leung0826 |
Maintainer Contact: | simple@gmail.com (leung) |
Package Create Date: | 2017-03-24 |
Package Last Update: | 2019-04-28 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-22 03:13:30 |
Package Statistics | |
---|---|
Total Downloads: | 6,832 |
Monthly Downloads: | 129 |
Daily Downloads: | 0 |
Total Stars: | 16 |
Total Watchers: | 2 |
Total Forks: | 4 |
Total Open Issues: | 0 |
Adminer is a full-featured database management tool written in PHP. This package automates setup for adminer and routes your.domain.here/adminer to the the adminer.php script.
composer require leung/laravel-adminer
OR
composer.json
"require": {
"leung/laravel-adminer": "^2.0"
},
open your config/app.php
and add this line in providers section
Simple\Adminer\AdminerServiceProvider::class
open your app/Providers/AppServiceProvider.php
and add this line in the register()
function
if ($this->app->environment() !== 'production') {
$this->app->register(\Simple\Adminer\AdminerServiceProvider::class);
}
auto included via automatic package discovery
// no need to add anything!!!
php artisan adminer:update
You can configure your composer.json to do this after each commit:
"scripts": {
"post-install-cmd": [
"php artisan adminer:update"
],
"post-update-cmd": [
"php artisan adminer:update"
]
}
to override this you may add a adminer route to your App routes.php
Route::any('adminer', '\Simple\Adminer\Controllers\AdminerController@index')->middleware('adminer_custom_middleware'); // where you defined your middleware in app/Http/Kernel.php
to add a custom middleware group you will need to add it to middlewareGroups in your app/Http/Kernel.php
protected $middlewareGroups = [
...
'adminer_custom_middleware' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// you may create customized middleware to fit your needs
...
],
];
also add adminer to $except array if you are using the example optional adminer group
protected $except = [
'adminer'
];