Files
generic_table_examples/app/Tables/TableWithActionColumn.php
David 69a87b3a5c #FEAT
+ Added EMPTY flag to be used by column settings
2025-03-26 06:11:38 -04:00

32 lines
789 B
PHP

<?php
namespace App\Tables;
use App\Models\Product;
use App\Tables\Traits\WithExportableProductColumns;
use Illuminate\Database\Eloquent\Model;
use Mmt\GenericTable\Interfaces\IActionColumn;
use Mmt\GenericTable\Interfaces\IEvent;
use Mmt\GenericTable\Interfaces\IGenericTable;
use Mmt\GenericTable\Support\EventArgs;
class TableWithActionColumn implements IGenericTable, IActionColumn, IEvent
{
use WithExportableProductColumns;
public Model|string $model = Product::class;
public int $actionColumnIndex = 0;
public function actionView(Model $item): \Illuminate\View\View
{
return view("tables_action_views.edit_delete_details", ['productId' => $item->id]);
}
public function dispatchCallback(EventArgs $arguments): void
{
}
}