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

Call to undefined method App\Nova\Actions\Import{Resource}::shownOnIndex() #33

Open
LaravelLover069 opened this issue Apr 3, 2022 · 0 comments

Comments

@LaravelLover069
Copy link

LaravelLover069 commented Apr 3, 2022

Hi all, I came across this issue following the installation instructions in this package.
I found that one important dependency was missing in the "use statements" which is causing the issue:

161376389-a8c17145-35a3-4f7d-8a26-3957163a1a2f

While searching for a solution I found this YouTube Video which helped me to track down the root cause.
I am sharing the solution to all who have the same problem getting started with this really amazing package.

Error:
Call to undefined method App\Nova\Actions\ImportResource}::shownOnIndex()

Impact:

  1. Error message keeps popping up whenever viewing the resource list
  2. Detail page of a resource is not opening with the following similar error message
    Call to undefined method App\Nova\Actions\ImportResource}::shownOnDetail()

Cause:
The use statement "use Laravel\Nova\Actions\Action;" is missing in the example import action "\Nova\Actions\Import{Resource}.php"

Solution:
Add "use Laravel\Nova\Actions\Action;" to the use statements:

Remark:
Please add the use of "use Laravel\Nova\Actions\Action;" to your documentation.
I have added this and made a commit request to get this added. Thanks for the package!

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

1 participant