app/Http/Resources/ReportResource.php
/**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
     */
Transform the resource into an array.
Transform the resource into an array .
public function toArray($request)
    {
        return [
            'id' => $this->id,
            'category_name' => $this->category_name,
            'total' => $this->total,
            'assigned' => $this->assigned,
            'available' => $this->available,
            'not_available' => $this->not_available,
            'waiting_for_recycling' => $this->waiting_for_recycling,
            'recycled' => $this->recycled,
        ];
    }
public function toArray ( $ request ) { return [ 'id' => $ this -> id , 'category_name' => $ this -> category_name , 'total' => $ this -> total , 'assigned' => $ this -> assigned , 'available' => $ this -> available , 'not_available' => $ this -> not_available , 'waiting_for_recycling' => $ this -> waiting_for_recycling , 'recycled' => $ this -> recycled , ] ; }
Transform the resource into an array.
Transform the resource into an array .