You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
574 B
25 lines
574 B
|
1 month ago
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\Api;
|
||
|
|
|
||
|
|
use App\Http\Controllers\Controller;
|
||
|
|
use Illuminate\Http\JsonResponse;
|
||
|
|
use Illuminate\Http\Request;
|
||
|
|
|
||
|
|
class UserProfileController extends Controller
|
||
|
|
{
|
||
|
|
public function show(Request $request): JsonResponse
|
||
|
|
{
|
||
|
|
$user = $request->user();
|
||
|
|
$app = $user->application;
|
||
|
|
|
||
|
|
return response()->json([
|
||
|
|
'id' => $user->id,
|
||
|
|
'mobile' => $user->mobile,
|
||
|
|
'name' => $user->name,
|
||
|
|
'email' => $user->email,
|
||
|
|
'application_status' => $app?->status,
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|