<?php

namespace App\Http\Controllers\Account;

use App\Http\Controllers\Controller;
use App\Models\User;

class ProfileController extends Controller
{
    private User $userModel;

    public function __construct(User $userModel)
    {
        $this->middleware(['front', 'auth']);
        $this->userModel = $userModel;
    }

    /**
     * 내 정보
     * @method GET
     * @see /account
     */
    public function index()
    {
        $member = $this->userModel->info();

        return view(layout('account.profile'), [
            'member' => $member,
            'menuID' => 'PROFILE'
        ]);
    }
}
