public function setData($collection, $resource_name = '')
    {
        $this->collection = collect();

        if (!$this->resource_name) {
            $this->resource_name = empty($resource_name) ? 'undefined' : $resource_name;
        }

        $this->data = [];
        
        foreach ($collection as $item) {
            $this->collection->push(clone $item);
            $i = new Item($item, $this->resource_name);
            array_push($this->data, $i->getData());
        }
        $this->response['data'] = $this->data;
    }