Laravel problem with php artisan serves

0

I'm following a lesson from Laravel 5.6, and during class, I created the project in laravel, already with all the tools installed. NPM, Composer, Xampp etc.

Then I ran the command:

composer create-project --prefer-dist laravel/laravel projeto

I did the whole class procedure, and tested the project using the web server with the command:

php artisan serve

I joined the project and everything went well. Soon after, I made git push , versioning my project. This lesson has been tutored and tested at home.

The next day, I wanted to continue my class from where I left off, but from my job and not from home.

I made git clone , and tried to start the project again with the command:

php artisan serve

And he introduced me the error:

  

PHP Warning: require (C: \ Users \ mazola \ Downloads \ Udemy-Laravel-Routes / vendor / autol oad.php): failed to open stream: No such file or directory in C: \ Users \ mazola \ Do wnloads \ Udemy-Laravel-Routes \ artisan on line 18

     Warning: require (C: \ Users \ mazola \ Downloads \ Udemy-Laravel-Routes / vendor / autoload.p hp): failed to open stream: No such file or directory in C: \ Users \ mazola \ Downloa ds \ C: \ Users \ mazola \ Downloads \ Udemy-Laravel-Routes / vendor / autoload.php '(include_path =' C: \ xampp \ php \ PEAR ') in C: \ Users \ mazola \ Downloads \ Udemy-Laravel-Routes \ artisan on line 18

     

Fatal error: require (): Failed opening required 'C: \ Users \ mazola \ Downloads \ Udemy -Larvel-Routes / vendor / autoload.php' (include_path = 'C: \ xampp \ C: \ Use rs \ mazola \ Downloads \ Udemy-Laravel-Routes \ artisan on line 18

Not satisfied, I did a lot of research, and I ended up finding some "solutions"

One of them was to run the command:

composer update

I circled, and gave php artisan serve again. And I went to test in the browser accessing localhost:8000

This time I accessed, and started the server, however, when I accessed the page it presented me with an error page:

  

500 Whoops, something went wrong on our servers.

It's worth noting that after I uploaded the project in git and made the clone again, the .env file was no longer available, only .env.examples .

Then, I entered the file .env.examples and "saved as" naming it to .env , and tried to start again, and ended up going without problems, on the routes I had already configured in class, with no errors .

I do not know what procedure to do to start the project in the correct and standardized way, what procedure did I do to work out the standard used in the market?

    
asked by anonymous 30.10.2018 / 02:04

1 answer

0

Define what this "standard used in the market" is. Generally to have Laravel on your machine, check if the composer is installed, then it gives the command to start the project with the framework. Be aware when cloning projects, make sure any files are missing or there is a versioning problem

If you need more details: link

    
31.10.2018 / 03:44