<?php

namespace App\Http\Controllers\FrontEnd;

use Carbon\Carbon;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cookie;

class UserController extends Controller
{
    public function loginPage()
    {
        $randomNumber = random_int(1000, 9999);
        //dd(Carbon::now()->format('Y-m-d h:m:s'));
        $request_id = sendRequest('post', 'http://panel.filmaa.ir/api/login_with_code/api.php/login_with_code/', [
            'code' => $randomNumber,
            'expire_time' => Carbon::now()->addDay()->format('Y-m-d h:m:s'),
        ]);

        return view('frontend.login', compact('randomNumber','request_id'));
    }
}
