Browse Source

Update Page\Delete

Visman 4 years ago
parent
commit
21041be5d5
1 changed files with 2 additions and 5 deletions
  1. 2 5
      app/Models/Pages/Delete.php

+ 2 - 5
app/Models/Pages/Delete.php

@@ -21,7 +21,7 @@ class Delete extends Page
      */
      */
     public function delete(array $args, string $method): Page
     public function delete(array $args, string $method): Page
     {
     {
-        $post = $this->c->posts->load((int) $args['id']);
+        $post = $this->c->posts->load($args['id']);
 
 
         if (
         if (
             empty($post)
             empty($post)
@@ -130,10 +130,7 @@ class Delete extends Page
                 'cancel'  => [
                 'cancel'  => [
                     'type'      => 'btn',
                     'type'      => 'btn',
                     'value'     => __('Cancel'),
                     'value'     => __('Cancel'),
-                    'link'      => $this->c->Router->link(
-                        'ViewPost',
-                        $args
-                    ),
+                    'link'      => $this->c->Router->link('ViewPost', $args),
                 ],
                 ],
             ],
             ],
         ];
         ];