<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Lib\ApiAuthHelper;
use App\Models\Property;
use App\Models\PropertyUser;
use App\Models\User;
use Illuminate\Http\Request;
use Laravel\Sanctum\PersonalAccessToken;
use Laravel\Sanctum\Sanctum;

class TestController extends Controller
{
    use ApiAuthHelper;

    public function test(Request $request)
    {
        $token = $this->updateExpiresTime($request);

        return response()->json(['info' => 'you are here!Bravo', 'request'=>$request->all(),'token' => $request->bearerToken(), 'token' => $token]);
    }

    public function test_web()
    {
        $user = User::find(3);
        $property = $user->properties;
        $status = $property[0]->propertyStatusUser($user->id);

        dd($user->id, $property, $status, $status->status);

    }
}
