PHP code example of miroc / laravel-adminer

1. Go to this page and download the library: Download miroc/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/ */

    

miroc / laravel-adminer example snippets


use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;

class CustomVerifyCsrfToken extends VerifyCsrfToken {

    protected $excludedRoutes = ['adminer'];

	public function handle($request, Closure $next)
	{
        if ($this->isExcludedRoute($request)){
            return $next($request);
        } else {
            return parent::handle($request, $next);
        }
	}

    private function isExcludedRoute($request)
    {
        if (count($request->segments()) > 0
            && in_array($request->segment(1), $this->excludedRoutes)){
            return true;
        } else {
            return false;
        }
    }
}