Reputation: 159
I was able to do install Homestead and to create a new app within the virtual machine.
However, I do have apps that I created outside the virtual machine and I would like to connect my database now. It is editable under localhost/phpmyadmin, it is my mysql standard installation in port 3306.
I have the folder that I have from the Internet and the first app that I specified is called Laravel, how do I do that?
If I just copy it in the same directory, I get:
php artisan serve
PHP Fatal error: Class 'Barryvdh\Debugbar\ServiceProvider' not found in /home/vagrant/Code/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
PHP Stack trace:
PHP 1. {main}() /home/vagrant/Code/foobooks/artisan:0
PHP 2. require_once() /home/vagrant/Code/foobooks/artisan:30
PHP 3. require() /home/vagrant/Code/foobooks/bootstrap/start.php:68
PHP 4. Illuminate\Foundation\ProviderRepository->load() /home/vagrant/Code/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/start.php:210
PHP 5. Illuminate\Foundation\ProviderRepository->compileManifest() /home/vagrant/Code/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:57
PHP 6. Illuminate\Foundation\ProviderRepository->createProvider() /home/vagrant/Code/foobooks/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:121
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Barryvdh\\Debugbar\\ServiceProvider' not found","file":"\/home\/vagrant\/Code\/foobooks\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}vagrant@homestead:~/Code/foobooks$
vagrant@homestead:~/Code/foobooks$ cd laravel
-bash: cd: laravel: No such file or directory
Upvotes: 1
Views: 948
Reputation: 57743
Move your database from your host machine into homestead:
artisan migrate
if you want a clean and empty database structure.Your homestead database is still accessible from your host machine at 127.0.0.1 and port 33060 (http://laravel.com/docs/4.2/homestead#daily-usage)
Here is a nice tutorial for homestead 2.0 in case you have problems to setup: https://laracasts.com/lessons/say-hello-to-laravel-homestead-two
Upvotes: 2