I issued 'composer create-project laravel/laravel first-projec'
after creating a new laravel project I cd'd into the project directory and ran 'php artisan serve'
the console prompted the following error:
Warning: require(C:\xampp\htdocs\first-projec\public/../vendor/autoload.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\first-projec\public\index.php on line 34
Fatal error: Uncaught Error: Failed opening required 'C:\xampp\htdocs\first-projec\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\first-projec\public\index.php:34 Stack trace: #0 {main} thrown in C:\xampp\htdocs\first-projec\public\index.php on line 34
I've tried a couple of solutions with no resolution:
it has to do with the /vendor/autoload.php file and I couldn't figure it out
I initially downloaded PHP manually through the official website (php.net), extracted the folder, added it to the Program Files directory, and created the required environmental variables.
I Also installed Composer through the Composer Installer.
the steps above might have caused some obscure problem that I'm not aware of.
now everything is working properly.