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

Extracting rules from form requests leveraging Laravel DI on rules method #707

Closed
1 task done
aledeg opened this issue Aug 15, 2023 · 2 comments
Closed
1 task done
Labels
question Further information is requested

Comments

@aledeg
Copy link

aledeg commented Aug 15, 2023

Scribe version

4.18.0

Your question

I am using form requests to generate my documentation.
It was working well until I hit a dead-end while working a form request that leverage Laravel dependency injection in the rules method.

I've checked the code where the rules method is called on the form request.
The call is made without parameters.
Thus explaining why the documentation cannot be generated.

I was wondering if there is something I can do with the current state of the library.
If not, it could be nice to have a hook similar for the form request instantiation but for the rules extraction.

I've already tried to use the form request instantiation by changing the DI on my form request but because of the number of parameters used in the extended class, it is not very readable.
It works but it is dirty.
I find it clearer to stick with Laravel DI in the rules method.

Thank you.

Docs

@aledeg aledeg added question Further information is requested triage labels Aug 15, 2023
@shalvah shalvah removed the triage label Aug 26, 2023
@shalvah
Copy link
Contributor

shalvah commented Aug 26, 2023

This should be possible now on the master branch (8407835)

@shalvah shalvah closed this as completed Aug 26, 2023
@aledeg
Copy link
Author

aledeg commented Sep 4, 2023

Great! I can't wait to use it. Thank you @shalvah!

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

No branches or pull requests

2 participants