Examples
Grid view examples
belal ddx
DaadadakkLorem ipsum dolor sit amet consectetur adipisicing elit.
hello
2132tytyiuLorem ipsum dolor sit amet consectetur adipisicing elit.
cdcsdc
Keykha asfdLorem ipsum dolor sit amet consectetur adipisicing elit.
Just for testt adsf
TestLorem ipsum dolor sit amet consectetur adipisicing elit.
test123
DwadwadLorem ipsum dolor sit amet consectetur adipisicing elit.
sdsd
Test@test.testLorem ipsum dolor sit amet consectetur adipisicing elit.
tesdasda
Javonte.kutch@example.comxfzLorem ipsum dolor sit amet consectetur adipisicing elit.
Bande de iok
Qcollier@example.ukLorem ipsum dolor sit amet consectetur adipisicing elit.
Brycen Schade
Celestinoprenner@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mrs. Kassandra Stiedemann
Griffin.aufderha00r@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Lonie Koch
Aweissnat@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Marietta Labadie
Alexandrea.sanford@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Dr. Alessandra Schaefer
Submit gggggLorem ipsum dolor sit amet consectetur adipisicing elit.
Oswaldo Lind
Tyshawn26@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mr. Jerrod Glover
Cjohnston@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Creola Stracke
Maymie80@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Ashlynn Mosciski
Krajcik.rhiannon@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Arthur Oberbrunner
Sporer.salvatore@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Tara Rodriguez
Asenger@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Ransom Cronin
Zaria63@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
<?php
namespace App\Http\Livewire;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use LaravelViews\Facades\UI;
use LaravelViews\Views\GridView;
class UsersGridView extends GridView
{
public $maxCols = 3;
/**
* Sets a initial query with the data to fill the grid view
*
* @return Builder Eloquent query
*/
public function repository(): Builder
{
return User::query();
}
/**
* Sets the data to every card on the view
*
* @param $item Current model for each card
*/
public function card($item)
{
return [
'image' => asset('storage/' . $item->profile_picture),
'title' => $item->name,
'subtitle' => ucfirst($item->email),
'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. '
];
}
}
belal ddx
DaadadakkLorem ipsum dolor sit amet consectetur adipisicing elit.
hello
2132tytyiuLorem ipsum dolor sit amet consectetur adipisicing elit.
cdcsdc
Keykha asfdLorem ipsum dolor sit amet consectetur adipisicing elit.
Just for testt adsf
TestLorem ipsum dolor sit amet consectetur adipisicing elit.
test123
DwadwadLorem ipsum dolor sit amet consectetur adipisicing elit.
sdsd
Test@test.testLorem ipsum dolor sit amet consectetur adipisicing elit.
tesdasda
Javonte.kutch@example.comxfzLorem ipsum dolor sit amet consectetur adipisicing elit.
Bande de iok
Qcollier@example.ukLorem ipsum dolor sit amet consectetur adipisicing elit.
Brycen Schade
Celestinoprenner@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mrs. Kassandra Stiedemann
Griffin.aufderha00r@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Lonie Koch
Aweissnat@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Marietta Labadie
Alexandrea.sanford@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Dr. Alessandra Schaefer
Submit gggggLorem ipsum dolor sit amet consectetur adipisicing elit.
Oswaldo Lind
Tyshawn26@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mr. Jerrod Glover
Cjohnston@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Creola Stracke
Maymie80@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Ashlynn Mosciski
Krajcik.rhiannon@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Arthur Oberbrunner
Sporer.salvatore@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Tara Rodriguez
Asenger@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Ransom Cronin
Zaria63@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
<?php
namespace App\Http\Livewire;
use App\Filters\UsersActiveFilter;
use App\Filters\UsersCreatedAtFilter;
use App\Filters\UsersTypeFilter;
class UsersWithFiltersGridView extends UsersGridView
{
public $searchBy = ['name', 'email'];
protected function filters()
{
return [
new UsersActiveFilter,
new UsersTypeFilter,
new UsersCreatedAtFilter
];
}
}
belal ddx
DaadadakkLorem ipsum dolor sit amet consectetur adipisicing elit.
hello
2132tytyiuLorem ipsum dolor sit amet consectetur adipisicing elit.
cdcsdc
Keykha asfdLorem ipsum dolor sit amet consectetur adipisicing elit.
Just for testt adsf
TestLorem ipsum dolor sit amet consectetur adipisicing elit.
test123
DwadwadLorem ipsum dolor sit amet consectetur adipisicing elit.
sdsd
Test@test.testLorem ipsum dolor sit amet consectetur adipisicing elit.
tesdasda
Javonte.kutch@example.comxfzLorem ipsum dolor sit amet consectetur adipisicing elit.
Bande de iok
Qcollier@example.ukLorem ipsum dolor sit amet consectetur adipisicing elit.
Brycen Schade
Celestinoprenner@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mrs. Kassandra Stiedemann
Griffin.aufderha00r@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Lonie Koch
Aweissnat@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Marietta Labadie
Alexandrea.sanford@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Dr. Alessandra Schaefer
Submit gggggLorem ipsum dolor sit amet consectetur adipisicing elit.
Oswaldo Lind
Tyshawn26@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mr. Jerrod Glover
Cjohnston@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Creola Stracke
Maymie80@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Ashlynn Mosciski
Krajcik.rhiannon@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Arthur Oberbrunner
Sporer.salvatore@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Tara Rodriguez
Asenger@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Ransom Cronin
Zaria63@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
<?php
namespace App\Http\Livewire;
use App\Actions\ChangeUserAsAdmin;
use App\Actions\ChangeUserAsWriter;
use App\Actions\ToggleUserAction;
class UsersWithActionsGridView extends UsersWithFiltersGridView
{
protected function actionsByRow()
{
return [
new ChangeUserAsAdmin,
new ChangeUserAsWriter,
new ToggleUserAction,
];
}
}
belal ddx
DaadadakkLorem ipsum dolor sit amet consectetur adipisicing elit.
hello
2132tytyiuLorem ipsum dolor sit amet consectetur adipisicing elit.
cdcsdc
Keykha asfdLorem ipsum dolor sit amet consectetur adipisicing elit.
Just for testt adsf
TestLorem ipsum dolor sit amet consectetur adipisicing elit.
test123
DwadwadLorem ipsum dolor sit amet consectetur adipisicing elit.
sdsd
Test@test.testLorem ipsum dolor sit amet consectetur adipisicing elit.
tesdasda
Javonte.kutch@example.comxfzLorem ipsum dolor sit amet consectetur adipisicing elit.
Bande de iok
Qcollier@example.ukLorem ipsum dolor sit amet consectetur adipisicing elit.
Brycen Schade
Celestinoprenner@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mrs. Kassandra Stiedemann
Griffin.aufderha00r@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Lonie Koch
Aweissnat@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Marietta Labadie
Alexandrea.sanford@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Dr. Alessandra Schaefer
Submit gggggLorem ipsum dolor sit amet consectetur adipisicing elit.
Oswaldo Lind
Tyshawn26@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Mr. Jerrod Glover
Cjohnston@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Creola Stracke
Maymie80@example.orgLorem ipsum dolor sit amet consectetur adipisicing elit.
Ashlynn Mosciski
Krajcik.rhiannon@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Arthur Oberbrunner
Sporer.salvatore@example.comLorem ipsum dolor sit amet consectetur adipisicing elit.
Tara Rodriguez
Asenger@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
Ransom Cronin
Zaria63@example.netLorem ipsum dolor sit amet consectetur adipisicing elit.
<?php
namespace App\Http\Livewire\GridView;
use App\Actions\Bulk\ChangeUsersAsAdmin;
use App\Actions\Bulk\ChangeUsersAsWriter;
use App\Http\Livewire\UsersWithActionsGridView;
class UsersWithBulkActionsGridView extends UsersWithActionsGridView
{
public function bulkActions()
{
return [
new ChangeUsersAsAdmin,
new ChangeUsersAsWriter
];
}
}