mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Livewire tables installed
This commit is contained in:
26
app/Http/Livewire/Tables/CityTable.php
Normal file
26
app/Http/Livewire/Tables/CityTable.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Tables;
|
||||
|
||||
use App\Models\City;
|
||||
use Rappasoft\LaravelLivewireTables\DataTableComponent;
|
||||
use Rappasoft\LaravelLivewireTables\Views\Column;
|
||||
|
||||
class CityTable extends DataTableComponent
|
||||
{
|
||||
protected $model = City::class;
|
||||
|
||||
public function configure(): void
|
||||
{
|
||||
$this->setPrimaryKey('id');
|
||||
}
|
||||
|
||||
public function columns(): array
|
||||
{
|
||||
return [
|
||||
Column::make("Stadt Name", "name")
|
||||
->sortable()
|
||||
->searchable(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user