Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal异常 #5529

Open
Thanosss opened this issue Feb 26, 2022 · 3 comments
Open

Modal异常 #5529

Thanosss opened this issue Feb 26, 2022 · 3 comments

Comments

@Thanosss
Copy link

  • Laravel Version: 8.83.2
  • PHP Version:7.3.4
  • Laravel-admin: 1.8.14

Description:

Sorry, I may not understand the usage of modal. I want to output the details of the current line to me by clicking the name, but it can't be realized. Please ask how to solve this problem. Thank you!
image
image

Steps To Reproduce:

@keller31
Copy link
Contributor

keller31 commented Mar 1, 2022

异步 modal需要传入一个 Renderable 实例 ,截图中你传入的是一个 model 吧?

多看文档、仔细看文档
https://laravel-admin.org/docs/zh/1.x/model-grid-column-display#%E5%BC%82%E6%AD%A5%E5%8A%A0%E8%BD%BD

@Yanghsuanming
Copy link

usage

$grid->model()->where(.....)->orderBy('id', 'desc');

@alexoleynik0
Copy link

You need to first create your Renderable class with all the details, and then correctly call it in the grid for a column.
Not $grid->column('files')->model(PostFilesRenderable); but $grid->column('files')->model('Files', PostFilesRenderable); -- two arguments.
See examples in #5701 for more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants