File: D:/HostingSpaces/SBogers10/lmbm.komma.pro/app/KommaApp/Auth/LoginController.php
<?php
namespace App\KommaApp\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Route;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
/**
* @var int $maxAttempts How many times you may try to login with wrong credentials before being locked out
*/
protected $maxAttempts = 5;
/**
* @var int $decayMinutes How long it takes before you can login again after being locked out in minutes
*/
protected $decayMinutes = 1;
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/kms';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
// check for "frontend" user
if(\Route::current() && \Route::current()->uri == "login") {
$this->redirectTo = url()->previous();
}
}
public function showLoginForm()
{
return view('kms.auth.login');
}
}