Want to access all of our courses? (36 h 00 min)
You also get:
Already a member? Login here
I setup the larastan plugin in this project and I am getting 1 error dealing with the (int) that we setup in hear
return match ((int)$this->role_id)
$ ./vendor/bin/phpstan analyse Note: Using configuration file C:\xampp\htdocs\awi_projects\project-1\phpstan.neon. 42/42 [============================] 100%
Line Models\User.php
49 Match expression does not handle remaining values: int<min, 0>|int<4, max>
[ERROR] Found 1 error
have a suggestion as to how to fix this ?
maby using 0,1,2 instead ?
I also had to add the redirection to that route in the 'RedirectIfAuthenticated' middleware.
just what did you add please give example
I am haveing NO issue when I am using laravel 10.8.0
Yes, sorry Im using laravel 9.19 So I had to add this line of code in 'RedirectIfAuthenticated':
foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { //return redirect(RouteServiceProvider::HOME); return redirect()->route( auth()->user()->getRedirectRouteName() ); } }
Tell us what you like or what we can improve
Feel free to share anything you like or dislike about this page or the platform in general.
Your feedback has been received. We truly appreciate you taking the time to help us improve.
I setup the larastan plugin in this project and I am getting 1 error dealing with the (int) that we setup in hear
return match ((int)$this->role_id)
$ ./vendor/bin/phpstan analyse Note: Using configuration file C:\xampp\htdocs\awi_projects\project-1\phpstan.neon. 42/42 [============================] 100%
Line Models\User.php
49 Match expression does not handle remaining values: int<min, 0>|int<4, max>
[ERROR] Found 1 error
have a suggestion as to how to fix this ?
maby using 0,1,2 instead ?
I also had to add the redirection to that route in the 'RedirectIfAuthenticated' middleware.
just what did you add please give example
I am haveing NO issue when I am using laravel 10.8.0
Yes, sorry Im using laravel 9.19 So I had to add this line of code in 'RedirectIfAuthenticated':
foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { //return redirect(RouteServiceProvider::HOME); return redirect()->route( auth()->user()->getRedirectRouteName() ); } }