SOLUTION: laravel new project-name
was actually giving me an error that i overlooked. I had the wrong version of php. It requires phpv7.1.3 or higher. If you don't have it it doesn't work.
Ran into one other problem:
- i had a system environment variable that is pointing to an old version of php
- Also laravel requires openssl extension and mbstring to turned on. UNCOMMENTED from php.ini
FOR NEWCOMERS: if you have just downloaded php and unzipped the file. It contains a file called
install.txt
that you HAVE to read. It explains everything.
I ran laravel new blog
from their getting started page. When I tried to run php artisan serve
, I got the following error:
Warning: require(C:\Projects\laravel-projects\blog/vendor/autoload.php): failed to open stream: No such file or directory in C:\Projects\laravel-projects\blog\artisan on line 18
The artisan file is pointing to
require __DIR__.'/vendor/autoload.php';
this directory does not exist. Even if I point it to the correct directory, it still wouldn't work because I don't have read permissions for that folder (so it gets denied).
What's going on, and how can I fix this?
EDIT: changed the url from the mentioned above to:
C:\Users\sarkis\AppData\Roaming\Composer\vendor\autoload.php
This worked perfectly for some reason. And NOW. A NEW ERROR HAS APPEARED.
Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Projects\laravel-projects\blog\bootstrap\app.php:14 Stack trace:#0 C:\Projects\laravel-projects\blog\artisan(21): require_once() #1 {main} thrown in C:\Projects\laravel-projects\blog\bootstrap\app.php on line 14
found that i don't have the proper version of php required.