You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
487 B
PHTML
27 lines
487 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Inertia\Inertia;
|
||
|
|
||
|
class AuthController extends Controller
|
||
|
{
|
||
|
public function login()
|
||
|
{
|
||
|
return Inertia::render('Auth/Login');
|
||
|
}
|
||
|
|
||
|
public function store(Request $request)
|
||
|
{
|
||
|
session(['user' => $request->input()]);
|
||
|
return redirect()->route('dashboard');
|
||
|
}
|
||
|
|
||
|
public function destroy()
|
||
|
{
|
||
|
session()->flush();
|
||
|
return redirect()->route('login');
|
||
|
}
|
||
|
}
|