3 Commits

Author SHA1 Message Date
13b54a563d search prefix 2024-12-23 16:52:20 +03:00
a3b5f5fa0c fix filter row 2024-12-23 15:05:02 +03:00
708045664c example update 2024-08-29 13:15:41 +03:00
3 changed files with 7 additions and 4 deletions

6
composer.lock generated
View File

@ -8,11 +8,11 @@
"packages": [
{
"name": "itguild/tables",
"version": "1.0.3",
"version": "1.0.5",
"source": {
"type": "git",
"url": "https://git.itguild.info/ItGuild/tables",
"reference": "1f2b93baf1835191733ed8d5ed0650bdad2e058d"
"reference": "ad18d94489c20599ac1080a8b4f7f3199f206fdf"
},
"type": "library",
"autoload": {
@ -30,7 +30,7 @@
"email": "apuc06@mail.ru"
}
],
"time": "2024-08-29T09:41:17+00:00"
"time": "2024-08-29T10:13:51+00:00"
}
],
"packages-dev": [

View File

@ -44,7 +44,8 @@ try {
'currentPage' => 1,
'perPage' => 3,
'params' => ["class" => "table table-bordered", "border" => "2"],
'baseUrl' => "/admin/user"
'baseUrl' => "/admin/user",
'filters' => ["email"]
]));
$table->columns([
'username' => [

View File

@ -48,6 +48,8 @@ class EloquentDataProvider
$this->meta['baseUrl'] = $options['baseUrl'] ?? $model->table;
$this->meta['params'] = $options['params'] ?? [];
$this->meta['actions'] = $options['actions'] ?? [];
$this->meta['searchPrefix'] = $options['searchPrefix'] ?? '/search';
$this->meta['showFiltersRow'] = $options['showFiltersRow'] ?? true;
$this->filters = $options['filters'] ?? [];
$this->createQuery();
$this->jsonStr = (new JSONCreator($this->meta, $this->getCollection()->toArray(), $this->filters,))->getJson();