<?php

namespace App\Datatables\Admin\Shop;

use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\Content;
use Yajra\DataTables\Html\Column;

class ContentsDataTable extends DataTable
{
    public $model_name = 'contents';

    public function query(Content $model)
    {
        return $this->buildQuery($model);
    }

    public function modifier($datatables)
    {
        $datatables->rawColumns(['text', 'action']);

        return parent::modifier($datatables);
    }

    protected function getColumns()
    {
        return [
            Column::make('id')->title('id'),
            Column::make('text')->title('Texte'),
            $this->makeColumnButtons(),
        ];
    }
}
