Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS (Fork of MedicOneSystems/livewire-datatables but with updating dependencies and support new Laravel versions in time)
I am having an error that is driving me mad! I'm sure there's something I am doing wrong but I have followed the documentation and even copied the example code (replacing it with my Bookings Model) and it still doesn't work.
I was using the Master branch from MedicOneSystems now have removed that package replacing it with this one, I have upgraded to Livewire 3 so need compatibility. I have the MedicOneSystems package working perfectly, but I'm struggling since replacing it with this package! Are there any major differences?
I am getting the following error:
Could not check compatibility between App\Livewire\Datatables\BookingsTable::builder(): App\Livewire\Datatables\Builder and Arm092\LivewireDatatables\Livewire\LivewireDatatable::builder(): Illuminate\Database\Eloquent\Builder, because class App\Livewire\Datatables\Builder is not available
Livewire\Datatables\BookingsTable
namespace App\Livewire\Datatables;
use App\Models\Booking;
use Arm092\LivewireDatatables\Column;
use Arm092\LivewireDatatables\DateColumn;
use Arm092\LivewireDatatables\NumberColumn;
use Arm092\LivewireDatatables\LabelColumn;
use Arm092\LivewireDatatables\Livewire\LivewireDatatable;
class BookingsTable extends LivewireDatatable
{
public function builder(): Builder
{
return Booking::query()
->Join('clients as c', 'client_id', 'c.id')
->Join('towns as t', 'town_id', 't.id');
}
public function getColumns(): array|Model
{
return [
NumberColumn::name('id')
->label('ID'),
Column::name('ref')
->label('Ref')
->searchable(),
Column::name('c.name')
->label('Client')
->searchable(),
Column::name('t.name')
->label('Booking Area'),
DateColumn::name('start')
->label('Start'),
DateColumn::name('end')
->label('End'),
];
}
}
Hello,
Hopefully, someone can help.
I am having an error that is driving me mad! I'm sure there's something I am doing wrong but I have followed the documentation and even copied the example code (replacing it with my Bookings Model) and it still doesn't work.
I was using the Master branch from MedicOneSystems now have removed that package replacing it with this one, I have upgraded to Livewire 3 so need compatibility. I have the MedicOneSystems package working perfectly, but I'm struggling since replacing it with this package! Are there any major differences?
I am getting the following error:
Could not check compatibility between App\Livewire\Datatables\BookingsTable::builder(): App\Livewire\Datatables\Builder and Arm092\LivewireDatatables\Livewire\LivewireDatatable::builder(): Illuminate\Database\Eloquent\Builder, because class App\Livewire\Datatables\Builder is not available
Livewire\Datatables\BookingsTable
Blade File
Thank you for any help :)