Uploading content
This commit is contained in:
32
app/Tables/TableWithActionColumn.php
Normal file
32
app/Tables/TableWithActionColumn.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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 = -1;
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user