Fixed delete link message issue solved..

This commit is contained in:
Cüneyt Şentürk
2022-06-02 18:45:38 +03:00
parent ff351be76e
commit a13d60ad64
3 changed files with 13 additions and 7 deletions
app/View/Components
resources/views/components/table

@ -207,6 +207,7 @@ class DeleteButton extends Component
$text = $this->text ? $this->text : $page;
$name = addslashes($this->model->{$this->modelName});
$name = Str::replace(['\"', '"'], '"', $name);
$type = mb_strtolower($this->getModelTitle());

@ -219,6 +219,7 @@ class DeleteLink extends Component
$text = $this->text ? $this->text : $page;
$name = addslashes($this->model->{$this->modelName});
$name = Str::replace(['\"', '"'], '"', $name);
$type = mb_strtolower($this->getModelTitle());

@ -101,8 +101,12 @@
@case('delete')
@php $divider = false; @endphp
@php $title = $action['title'] ?? null; @endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" />
@php
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
@break
@case('divider')