-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Fully support Request::validate method in IDE #22474
Comments
This should go to barryvdh/laravel-ide-helper's repository and isn't an issue from laravel itself. |
No! You are not right! If you write like this $request = new \Illuminate\Http\Request();
$request->validate(); Does your IDE see method validate() ? |
'validate' is implemented as a macro on request in the core, here. FoundationServiceProvider. Seems @LKDevelopment is correct. Don't really see another way. |
Thanks @devcircus i get it now. My opinion validate it's very good syntax sugar to place inside Request class. Code much smaller and elegant. But idea to make it via macros and fully lost autocomplete with check implementation, phpdoc and e.t.c..... very controversial. I personally don't like "magical", but if no way to fix this... sad :-( |
True. Still confused by this. I don't know of any other macros used in the core but I can't help but think that maybe there was a good reason for implementing it this way. Maybe worth opening an issue on the internals repo to discuss? |
Makes sense! Thanks. |
Description:
IDE not fully support
Illuminate\Http\Request::validate
autocomplete for object instances.Steps To Reproduce:
When you using barryvdh/laravel-ide-helper library, and try call
\Request::validate()
all works perfectly.When you have instance of
Illuminate\Http\Request
class and try to call method validate IDE don't see implementation of this method.Can you please fix this annoying small problem.
The text was updated successfully, but these errors were encountered: