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

View File

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

View File

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

View File

@ -101,8 +101,12 @@
@case('delete') @case('delete')
@php $divider = false; @endphp @php $divider = false; @endphp
@php $title = $action['title'] ?? null; @endphp @php
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" /> $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 @break
@case('divider') @case('divider')