<?php

namespace Ignite\Core\Models\Grid;

abstract class EloquentTable extends AbstractTable
{
    /**
     * Get the datatable instance.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     *
     * @return \Yajra\DataTables\DataTableAbstract
     */
    public function dataTable($query = null)
    {
        return $this->initDataTable($this->datatables->eloquent($query ?? $this->query()));
    }
}
