country flags added and country switcher added

This commit is contained in:
Benjamin Takats
2022-11-30 16:59:14 +01:00
parent 5da4044450
commit cad1ee22b9
526 changed files with 35618 additions and 25 deletions

View File

@@ -3,11 +3,14 @@
namespace App\Http\Livewire\Tables;
use App\Models\City;
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column;
class CityTable extends DataTableComponent
{
public string $country;
protected $model = City::class;
public function configure(): void
@@ -23,4 +26,10 @@ class CityTable extends DataTableComponent
->searchable(),
];
}
public function builder(): Builder
{
return City::query()
->whereHas('country', fn($query) => $query->where('code', $this->country));
}
}