Why is my freshly created laravel 9 project on PHP 8.0.8 showing an error by Visual Studio Code ?
VSCode shows this as an error :
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
Why is my freshly created laravel 9 project on PHP 8.0.8 showing an error by Visual Studio Code ?
VSCode shows this as an error :
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
If you're using MAMP on a macOS which has PHP pre-installed like PHP 7.1.33 on macOS Mojave then change in Visual Studio Code settings, PHP > Validate: Executable Path - edit in settings.json :
"php.validate.executablePath": ""
or
"php.validate.executablePath": "/usr/bin/php"
to
"php.validate.executablePath": "/Applications/MAMP/bin/php/php8.0.8/bin/php"