Personal data and password change
This commit is contained in:
24
app/Domains/UserManagement/Controllers/ProfileController.php
Normal file
24
app/Domains/UserManagement/Controllers/ProfileController.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\UserManagement\Controllers;
|
||||
|
||||
use App\Providers\InertiaProvider;
|
||||
use App\Scopes\CommonController;
|
||||
|
||||
class ProfileController extends CommonController
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
if (!$this->checkAuth()) {
|
||||
return redirect()->intended('/login');
|
||||
}
|
||||
|
||||
$user = auth()->user();
|
||||
|
||||
$inertiaProvider = new InertiaProvider('UserManagement/Profile', [
|
||||
'username' => $user->username,
|
||||
]);
|
||||
|
||||
return $inertiaProvider->render();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user