z-song / demo.laravel-admin.org

Source code of official http://demo.laravel-admin.org website.
507 stars 250 forks source link

Error opening or editing and deleting a post comment. #49

Open lordjack opened 5 years ago

lordjack commented 5 years ago

Hi

I'm wanting to pass an id to another page by filtering according to the passed ID Ex:

area - Main table id name type_id

area_type - secondary table id area_id name

I'm looking for an example, when clicking on an "area" action I can pass the area id and filter "area_type" from this filter. The example I found closest in the demo was the Post and comment.

when opening a post in the demo example through the link below. When you click on any view action, edit or delete the comment, it presents an error, does not open the form nor excludes. https://demo.laravel-admin.org/posts/1/edit

this error. https://demo.laravel-admin.org/demo/post-comments/38

I accessed the post controller, but I did not identify the error. https://github.com/z-song/demo.laravel-admin.org/blob/master/app/Admin/Controllers/PostController.php

Anyone have any tips, thanks?

Area grid - PostController

$grid->actions(function (Grid\Displayers\Actions $actions) { $actions->append('<a href="area-categoria/'.$actions->getKey().'"><i class="fa fa-paper-plane"></i></a>'); });

Area type grid - PostCommentController

$grid->filter(function ($filter) { $filter->like('content'); });