For anyone receiving this issue, This is actually an issue with a VSCode Laravel's Plugin called laravel-extra-intellisense.
The issue is actually from the plugin's issue as it uses functionality from Laravel 5.8 and above, so if your project uses Laravel's 5.7 and below you can do this to clear the error.
add this line in your config/app.php
'Arr' => Illuminate\Support\Arr::class, dlam config/app.php
and after adding the line, you may received a new error like so
[2020-10-06 05:57:04] local.ERROR: Uncaught ReflectionException: Class App\Policies\ModelPolicy does not exist in Command line code:1
Stack trace:
#0 Command line code(1): ReflectionClass->__construct('App\\Policies\\Mo...')
#1 [internal function]: {closure}('App\\Policies\\Mo...', 'App\\Model')
#2 Command line code(1): array_map(Object(Closure), Array, Array)
#3 {main}
thrown {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Uncaught ReflectionException: Class App\\Policies\\ModelPolicy does not exist in Command line code:1
Stack trace:
#0 Command line code(1): ReflectionClass->__construct('App\\\\Policies\\\\Mo...')
#1 [internal function]: {closure}('App\\\\Policies\\\\Mo...', 'App\\\\Model')
#2 Command line code(1): array_map(Object(Closure), Array, Array)
#3 {main}
thrown at Command line code:1)
[stacktrace]
#0 {main}
"}
You can solve this one by commenting this line in app\Providers\AuthServiceProvider.php
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
// 'App\Model' => 'App\Policies\ModelPolicy', <-- comment this line
];
All of these changes is already in the lastest Laravel (version 5.8 and above)
I think this happens because the plugin's logger handler isn't working so that is why it logs in your laravel's project. So until it is fixed, please do the above or upgrade your laravel.
You can check this issue in the plugin's github