<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use League\Config\Exception\ValidationException;
use Mockery\Exception;

class SignController extends Controller
{
    function getUser()
    {
        try {
            return response()->json(['status' => 1, 'data' =>['user' => Auth::getUser()] ,'message' => 'کاربر با موفقیت یافت شد', 200], 401);
        }catch (Exception $e){
            return response()->json(['status' => 0, 'message' => 'خطا در شناسایی کاربر', 201], 401);
        }
    }
}
