<?php

namespace Modules\Chat\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UserUpdateRequest extends FormRequest
{

    public function rules()
    {
        return [
            'first_name' => 'required',
            'last_name' => 'required',
            'profile_avatar' => 'mimes:jpg,jpeg,png|file|max:2048',
            'email' => 'required|unique:users,email,'.auth()->id(),
            'username' => 'required|unique:users,username,'.auth()->id(),
        ];
    }

    public function authorize()
    {
        return true;
    }
}
