0
votes

So I started a new project and I downloaded clone of it, I did composer install & update. And I do php artisan serve to start, but there is a error says in server.php :

if ($uri !== '/' && file_exists(__DIR__.'/public_html'.$uri)) {
    return false;
}

require_once __DIR__.'/public_html/index.php';

Warning: require_once(C:\Users\eless\PhpstormProjects\vigil/public_html/index.php): failed to open stream: No such file or directory in C:\Users\eless\PhpstormProjects\vigil\server.php on line 21

Fatal error: require_once(): Failed opening required 'C:\Users\eless\PhpstormProjects\vigil/public_html/index.php' (include_path='C:\xampp\php\PEAR') in C:\Users\eless\PhpstormProjects\vigil\server.php on line 21

then I change it to /public instead of /public_html then its just a white screen and made php artisan migration(there was some errors about table but) says

Whoops, looks like something went wrong

project is not visible. What I should do? Is anyone can help?

1
make sure you have .env file in your project root - Romantic Dev
yeah I do have it, but there is no APP_KEY other parts I added like database, etc - Berke
Also once your .env is in there, run php artisan key:gen and your storage permissions may need altering. - Option
OK now I did it. also name of .env file was something else I changed it, now It gives database error so I will check it out. - Berke
What error is it now giving? This is a different question to be honest.. - Option

1 Answers

0
votes

Rename .env.example to .env and then run php artisan key:gen to provide an APP_KEY within the .env file.

Edit your database config settings accordingly... (username, password etc)

Once this is done, run php artisan migrate to move your database migrations into the database you set up and then reload your browser.