<?php

namespace App\Datatables\Shop;

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

class HomepagesDataTable extends DataTable
{
    public $model_name = 'homepages';

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

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

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