Update apps

This commit is contained in:
Pusdatin BPKD Jkt
2022-07-20 15:12:55 +07:00
parent fd281d9c71
commit 28040765c9
6 changed files with 83 additions and 67 deletions
+9 -7
View File
@@ -14,8 +14,9 @@ class AuthController extends Controller
{
public function showFormLogin()
{
if (Auth::check()) { // true sekalian session field di users nanti bisa dipanggil via Auth
//Login Success
if (Auth::check()) {
// True sekalian session field di users nanti bisa dipanggil via Auth
// Login Success
return redirect()->route('home');
}
return view('login');
@@ -48,8 +49,9 @@ class AuthController extends Controller
Auth::attempt($data);
if (Auth::check()) { // true sekalian session field di users nanti bisa dipanggil via Auth
//Login Success
if (Auth::check()) {
// True sekalian session field di users nanti bisa dipanggil via Auth
// Login Success
$taValue = [];
for($i=2022;$i<=date("Y");$i++){
$taValue[] = $i;
@@ -57,9 +59,9 @@ class AuthController extends Controller
Session::put('listTA', $taValue);
return redirect()->route('home');
} else { // false
//Login Fail
} else {
// False
// Login Fail
Session::flash('error', 'NRK atau password salah');
return redirect()->route('login');
}