<?php

namespace Mehrab\User\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Mehrab\Service\Models\Service;

class update_admins_profile_request extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {

        return [
            'name' => ['nullable','string','max:15'],
            'lname' => ['nullable','string','max:15'],
            'email' => ['nullable','email',Rule::unique('users','email')->ignore(auth()->id())],
            'profile_pic' => ['nullable','mimes:jpg,jpeg','image','max:1024']
        ];
    }

}
