app/Http/Requests/UserProfileUpdateRequest.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()
    {
        $user_id = $this->route('profile');
        return [
            'name'=>'required',
            'last_name'=>'required',
            'email' => 'required|email|unique:users,email,'.$user_id,
            'password'=>'sometimes|AlphaNum|Between:5,10',
        ];
    }
public function rules ( ) { $ user_id = $ this -> route ( 'profile' ) ; return [ 'name' => 'required' , 'last_name' => 'required' , 'email' => 'required|email|unique:users,email,' . $ user_id , 'password' => 'sometimes|AlphaNum|Between:5,10' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .