|
@@ -3,6 +3,7 @@
|
|
|
namespace Dcat\Admin\Grid\Actions;
|
|
namespace Dcat\Admin\Grid\Actions;
|
|
|
|
|
|
|
|
use Dcat\Admin\Grid\RowAction;
|
|
use Dcat\Admin\Grid\RowAction;
|
|
|
|
|
+use Dcat\Admin\Support\Helper;
|
|
|
|
|
|
|
|
class Delete extends RowAction
|
|
class Delete extends RowAction
|
|
|
{
|
|
{
|
|
@@ -24,12 +25,17 @@ class Delete extends RowAction
|
|
|
'data-url' => $this->url(),
|
|
'data-url' => $this->url(),
|
|
|
'data-message' => "ID - {$this->getKey()}",
|
|
'data-message' => "ID - {$this->getKey()}",
|
|
|
'data-action' => 'delete',
|
|
'data-action' => 'delete',
|
|
|
- 'data-redirect' => request()->fullUrl(),
|
|
|
|
|
|
|
+ 'data-redirect' => $this->redirectUrl(),
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
return parent::render();
|
|
return parent::render();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected function redirectUrl()
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->parent->model()->withoutTreeQuery(request()->fullUrl());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function url()
|
|
public function url()
|
|
|
{
|
|
{
|
|
|
return "{$this->resource()}/{$this->getKey()}";
|
|
return "{$this->resource()}/{$this->getKey()}";
|