app/Http/Livewire/Datatable.php: Adding $route_restore variable
This commit is contained in:
parent
a88e21fb19
commit
11026c0c6e
1 changed files with 9 additions and 2 deletions
|
|
@ -53,13 +53,19 @@ class Datatable extends Component
|
|||
*/
|
||||
public $route_delete;
|
||||
|
||||
/**
|
||||
* Route for restoring a record (if null, link is omitted)
|
||||
*/
|
||||
public $route_restore;
|
||||
|
||||
/**
|
||||
* How many records should be displayed on one page.
|
||||
*/
|
||||
public int $itemsPerPage = 30;
|
||||
|
||||
public function mount(string $model, array $columns, array $sort_columns = [],
|
||||
$default_sort = '', $route_create = null, $route_delete = null, $route_edit = null)
|
||||
public function mount(string $model, array $columns,
|
||||
array $sort_columns = [], $default_sort = '',
|
||||
$route_create = null, $route_edit = null, $route_delete = null, $route_restore = null)
|
||||
{
|
||||
$this->model = app()->make($model);
|
||||
$this->default_sort = $default_sort;
|
||||
|
|
@ -68,6 +74,7 @@ class Datatable extends Component
|
|||
$this->route_create = $route_create;
|
||||
$this->route_edit = $route_edit;
|
||||
$this->route_delete = $route_delete;
|
||||
$this->route_restore = $route_restore;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue