public function toMultipart()
    {
        $data = [];
        foreach ($this->payload as $key => $value) {
            if($key!='file')
            {
                $data[] = ['name' => $key, 'contents' => $value];
            }
            else
            {
                $data[] = $value;
            }
        }
        return $data;
    }
public function toMultipart()
    {
        $data = [];
        foreach ($this->payload as $key => $value) {
            if($key!='file')
            {
                $data[] = ['name' => $key, 'contents' => $value];
            }
            else
            {
                $data[] = $value;
            }
        }
        return $data;
    }
public function toMultipart ( ) { $ data = [ ] ; foreach ( $ this -> payload as $ key => $ value ) { if ( $ key != 'file' ) { $ data [ ] = [ 'name' => $ key , 'contents' => $ value ] ; } else { $ data [ ] = $ value ; } } return $ data ; }
Create Multipart array

@return array
Create Multipart array