<?php

namespace App\Http\Requests\UserProfile;

use Illuminate\Foundation\Http\FormRequest;

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

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'address' => 'required',
            'city' => 'required',
            'state' => 'required',
            'post_code' => 'required',
            'phone_number' => 'required',
            'company' => 'required',
        ];
    }


    public function handleRequest(){
        $allRequest = $this->except('name', 'lastname', 'email');           
        
        return $allRequest;
    }
}
