After familiar with Codeigniter, I stared to learn Laravel.
I able to install Laravel using following command.
composer create-project --prefer-dist laravel/laravel blog
It works fine. :-)
Next I tried to setup sample Laravel project. I found a sample project from here (https://github.com/evercode1/sample-project).
What I did is I just download it and copied all folders to Xampp htdocs folder.
Then I visit the "http://localhost/sample-project-master/public/".
It gives following error.
Warning: require(D:\xampp\htdocs\sample-project-master\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\sample-project-master\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'D:\xampp\htdocs\sample-project-master\bootstrap/../vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\sample-project-master\bootstrap\autoload.php on line 17
Have I done mistake when setting up already available Laravel project? How I correct following errors or what is the way to import Laravel project?
You should do:
1) Install composer dependencies
composer install
2) An application key need to be generated with the command
php artisan key:generate
3) Open Project in a Code Editor, rename .env.example to .env and modify DB name, username, password to your environment.
4) Migrate the database along with seed
php artisan migrate --seed
5) Now run the artisan serve command
php artisan serve
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With