Moving laravel project to another directory

Viewed 3060

I just installed laravel. I use Windows Xampp. Currently I installed it in c:\users\user_name\laravel. Is that correct or should I put it in htdocs? If so how to do it? thanks for your help

3 Answers

Cut paste you laravel project in path to xampp\htdocs . set root folder of xampp to xampp\htdocs\laravel\public

Thanks to syam who helped me to start finding a fix to my problem. Here is my solution

  1. Move laravel project to htdocs

  2. Change the env configuration DB_DATABASE=your_db_name DB_USERNAME=user_name DB_PASSWORD=user_password

  3. Edit AppServiceProvider.php and add this code

    use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); }

  4. Then in command line move the active directory to your laravel project and execute this code

composer install

php artisan key:generate

php artisan cache:clear

php artisan migrate

On moving laravel project to another directory: To clear cache, sometimes permission problem may occur. Do this serially:

change env values then,

php artisan key:generate
php artisan config:clear
php artisan cache:clear
php artisan migrate
Related