user5638730 user5638730 - 2 months ago 30
Git Question

GitHub Laravel App Sync

I just created a Laravel App (I'm completely new to Laravel and also don't have so much experience with Git(Hub)).

I created it locally on my computer with the

composer require "laravel/installer"
command and then ran
composer create-project
. I also added authentification with new table rows (migration) etc, downloaded some things and e.g. donwloaded another language pack.

Now I uploaded everything to GitHub, except the things that are in .gitignore (that looks like the following):

# Created by .ignore support plugin (
### Laravel template

# Laravel 4 specific

# Laravel 5 & Lumen specific

# Rocketeer PHP task runner and deployment package.
### Composer template

# Commit your application's lock file
# You may choose to ignore a library lock file
# composer.lock

Basically what I tried on another computer now, was running composer install and then a php artisan migrate (to get the databases). But this didn't work. There where quite some errors, what I at least noticed was that I still got a
instead of a
. So there was a
uploaded instead of a
, is this correct?

However, whats the best practice or a good way to achieve what I want? Normally I'm working on the project on the computer I created the app, but sometimes I also want to work on and test something on another computer, so I need a local instace. After pushing everything to Github, what do I have to do on another copmuter to get my app running?

PS: I'm using Laravel 5.3


As @TimL said in the comments this will be because you're .env file won't have been set up. You're .env-example is there for you to copy to make life easier.

You can either copy and paste it over, or if you using the command line:

cp .env-example .env

Then you populate it with the details for that environment.

Finally, to generate your application key just run the command:

php artisan key:generate

and this will generate the key for you.

The only other manual thing I can think of it creating the database before you use migrate.

Hope this helps!