We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Adminer Middleware
php artisan make:middleware Adminer
File /app/Http/Middleware/Adminer.php:
/app/Http/Middleware/Adminer.php
<?php namespace App\Http\Middleware; use Auth; use Closure; class Adminer { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (!Auth::check()) { return redirect()->route('login'); } return $next($request); } }
Change /app/Http/Kernel.php:
/app/Http/Kernel.php
protected $routeMiddleware = [ ... 'adminer' => 'App\Http\Middleware\Adminer', ];
Add auto-login route:
Route::any('adminer', '\Miroc\LaravelAdminer\AdminerAutologinController@index')->middleware('adminer');
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add Admin User Auth Middleware
Create Adminer Middleware
File
/app/Http/Middleware/Adminer.php
:Change
/app/Http/Kernel.php
:Add auto-login route:
The text was updated successfully, but these errors were encountered: