1. Go to this page and download the library: Download rmitesh/card-stack library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Rmitesh\CardStack\Resources\Pages\Concerns\CardView;
class ViewPlan extends Page
{
use CardView;
}
namespace App\Filament\Widgets;
use Rmitesh\CardStack\Pages\Widgets\CardViewList;
use Illuminate\Database\Eloquent\Builder;
class PlanListView extends CardViewList
{
protected function getTableQuery(): Builder
{
// Your eloquest query
}
}
protected function getHeaderWidgets(): array
{
return [
PlanListView::class,
];
}
protected function getTableColumns(): array
{
return [
Tables\Columns\TextColumn::make('name'),
];
}
protected function getTableActions(): array
{
return [
//
];
}
protected function getTableHeaderActions(): array
{
return [
//
];
}
protected function getTableEmptyStateHeading(): ?string
{
// your message
}
protected function getTableEmptyStateDescription(): ?string
{
// your message
}