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

Ray doesnt showcase Request Class in Laravel Nova Resources #847

Closed
Montrii opened this issue Sep 19, 2023 · 4 comments
Closed

Ray doesnt showcase Request Class in Laravel Nova Resources #847

Montrii opened this issue Sep 19, 2023 · 4 comments

Comments

@Montrii
Copy link

Montrii commented Sep 19, 2023

Describe the bug
When i try to "print" a Request (That can be any Request inherited class meaning: NovaRequest, Request, ResourceCreateOrAttachRequest etc.) object within Laravel Ray within Laravel Nova, ray does not showcase anything about that object.
It does not print null or undefined, the object is initialised and does work normally.
When i parse the object into variables using parse_str, i can then sorta view the object.

Versions
2.7.5

You can use composer show to get the version numbers of:

  • spatie/ray package version: 1.38.0
  • spatie/laravel-ray package version (if applicable): 1.33.0

PHP version: 8.2 (Running Laravel app on Laravel Herd)
Laravel version (if applicable): v10.22.0
Laravel Nova version (additional): 4.27.12

To Reproduce
Steps to reproduce the behavior:

  1. Create a Eloquent Model, Factory, Seeder and Migration for a table in Laravel.
  2. Create a Laravel Nova Ressource for the created Eloquent Model
  3. Create Fields for the Model.
  4. Try to print the $request variable with Ray in either the fields(NovaRequest $request) methods directly or in any method that gets a Request instance passed (such as ->default(callback(ResourceCreateOrAttachRequest $request))
  5. The error occures

Expected behavior
Request object should be printed normally into ray without issues.

Desktop (please complete the following information):

  • OS: macOS
  • Ventura 13.5

Additional context
The issue seems to be related to the project? Using a different Laravel Nova Project with the following versions (Laravel: v.9.50.1, Nova: 4.21.0, spatie/ray: 1.36.0, spatie/laravel-ray: 1.32.1) causes no issue and returns expected behaviour. Printing any Request object in lets say a Controller via a Route works PERFECTLY fine. It only occurres in Laravel Nova Ressources.

@Montrii Montrii changed the title Ray doesnt showcase Request Class in Laravel Nova Ray doesnt showcase Request Class in Laravel Nova Resources Sep 19, 2023
@Vestibule
Copy link

Same problem here. No way to dump a Nova request through Ray.

@patinthehat
Copy link
Contributor

patinthehat commented Nov 19, 2023

@Montrii @Vestibule Does this occur if you only install the ray package (and not laravel-ray)?

@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

@rderks88
Copy link

This issue is still open. Until this day Ray refuses to output a NovaRequest object.
One way to get around is is call NovaRequest->toArray(), but you obviously do not get the entire object.

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

5 participants