feat: add MeController and endpoint for retrieving current user information
This commit is contained in:
14
app/Domains/Auth/Controllers/MeController.php
Normal file
14
app/Domains/Auth/Controllers/MeController.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Auth\Controllers;
|
||||
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MeController
|
||||
{
|
||||
public function __invoke(Request $request): JsonResponse
|
||||
{
|
||||
return response()->json($request->user());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user