I have problem in laravel project to move live server to localhost. I have download application zip file and extract it to my localhost server directory and import data table to database and also it install composer and migrate data table but localhost server is not run my project onbrowser. so please help me how to i do this and run my application on localhost. I follow this tutorial but it's not work with me.
1 Answer
- Go to live server then in your destination project directory
- Select all files and compress them to make a .zip file.
- Download this .zip file
- Decompress it
- Make a "public" directory in the same location where "laravelfiles" directory exist
- Select all files except "laravelfiles", move them into "public" directory
- In "public" directory open index.php file
- Edit this " require DIR.'/laravelfiles/vendor/autoload.php'; " to " require DIR.'/../vendor/autoload.php'; "
- Edit this " $app = require_once DIR.'/laravelfiles/bootstrap/app.php'; " to " $app = require_once DIR.'/../bootstrap/app.php'; "
- Go to "laravelfiles" directory,open cmd run "php artisan serve"
php artisan serve? Did it throw an error when entering localhost:8000 ?