app/Http/Requests/Profile/UpdateProfileRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'name' => 'required|string|max:255',
            'email' => 'required|string|email|max:255|unique:users,email,' .Auth::user()->id,
            'current_password' => 'nullable|required_with:new_password',
            'new_password' => 'nullable|min:8|max:12|required_with:current_password',
            'password_confirmation' => 'nullable|min:8|max:12|required_with:new_password|same:new_password',
            'company_name' => 'nullable|max:255',
            'company_address' => 'required_with_all:company_name|max:255',
            'company_contact' => 'required_with_all:company_name|max:255',
            'company_mission' => 'required_with_all:company_name|max:255',
            'company_profile' => 'required_with_all:company_name|max:255',
            'activate_point' => 'nullable|numeric|min:0'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|string|max:255' , 'email' => 'required|string|email|max:255|unique:users,email,' . Auth :: user ( ) -> id , 'current_password' => 'nullable|required_with:new_password' , 'new_password' => 'nullable|min:8|max:12|required_with:current_password' , 'password_confirmation' => 'nullable|min:8|max:12|required_with:new_password|same:new_password' , 'company_name' => 'nullable|max:255' , 'company_address' => 'required_with_all:company_name|max:255' , 'company_contact' => 'required_with_all:company_name|max:255' , 'company_mission' => 'required_with_all:company_name|max:255' , 'company_profile' => 'required_with_all:company_name|max:255' , 'activate_point' => 'nullable|numeric|min:0' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .