<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ListItemColumn extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            "columnDef"     => $this->columnDef,
            "header"        => $this->header,
            "cellName"      => is_null($this->cellName)?'':$this->cellName,
            "width"         => is_null($this->width)?'':$this->width,
            "textAlign"     => is_null($this->textAlign)?'':$this->textAlign,
            "font"          => $this->font,
        ];

    }
}
