PHP code example of leung / laravel-adminer

1. Go to this page and download the library: Download leung/laravel-adminer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

leung / laravel-adminer example snippets


Simple\Adminer\AdminerServiceProvider::class

if ($this->app->environment() !== 'production') {
    $this->app->register(\Simple\Adminer\AdminerServiceProvider::class);
}

   // no need to add anything!!!

    Route::any('adminer', '\Simple\Adminer\Controllers\AdminerController@index')->middleware('adminer_custom_middleware'); // where you defined your middleware in 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
        ...
    ],
];

protected $except = [
     'adminer'
 ];
 
bash
php artisan adminer:update
js
"scripts": {
    "post-install-cmd": [
        "php artisan adminer:update"
    ],
    "post-update-cmd": [
        "php artisan adminer:update"
    ]
}