Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

I'm having issues in setting up my laravel project

$
0
0

I got a new Laravel project but it showing the following error and it is not letting me run it using php artisan serve I tried using composer self-update too but it is not working....

Here's the error =>

php artisan serve

PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1349Stack trace:#0 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'C:\xampp\htdocs...', 1349)#1 C:\xampp\htdocs\fitway\vendor\composer\ClassLoader.php(576): include('C:\xampp\htdocs...')#2 C:\xampp\htdocs\fitway\vendor\composer\ClassLoader.php(427): Composer\Autoload{closure}('C:\xampp\htdocs...')#3 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\helpers.php(110): Composer\Autoload\ClassLoader->loadClass('Illuminate\Supp...')#4 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(130): collect(Array)#5 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(106): Illuminate\Foundation\PackageManifest->build()
#6 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): Illuminate\Foundation\PackageManifest->getManifest()#7 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')#8 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()#9 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(230): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Application))#10 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)#11 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 C:\xampp\htdocs\fitway\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))#13 {main} in C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\Collection.php on line 11

In Collection.php line 11:

During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatib
le with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in
C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1349
Stack trace:
#0 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handle
Error(8192, 'Return type of ...', 'C:\xampp\htdocs...', 1349)#1 C:\xampp\htdocs\fitway\vendor\composer\ClassLoader.php(576): include('C:\xampp\htdocs...')#2 C:\xampp\htdocs\fitway\vendor\composer\ClassLoader.php(427): Composer\Autoload{closure}('C:\xampp\htdocs...')#3 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Support\helpers.php(110): Composer\Autoload\ClassLoader->loadClass('Illuminate\Supp
...')#4 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(130): collect(Array)#5 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(106): Illuminate\Foundation\PackageManifest->build()
#6 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): Illuminate\Foundation\PackageManifest->getManife
st()#7 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('a
liases')#8 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest-

aliases()#9 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(230): Illuminate\Foundation\Bootstrap\RegisterFacades->bo
otstrap(Object(Illuminate\Foundation\Application))#10 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(310): Illuminate\Foundation\Application->bootstrapWit
h(Array)#11 C:\xampp\htdocs\fitway\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap
()#12 C:\xampp\htdocs\fitway\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony
\Component\Console\Output\ConsoleOutput))#13 {main}

Please tell me how can I resolve it.

I have tried changing the Php version in the .env file as well but it is not working either.

Chat or Gemini have not been much of help either....


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>