Install an existing Laravel project

Submitted by christophe on Thu, 06/07/2017 - 10:01

A quick todo list for setting up a freshly cloned project.

Install the dependencies with Composer.

# cd in your project directory
composer install
composer dumpautoload -o

Check if the values in config/app.php meets your needs, depending where (staging, dev, ...) and how (php -S, artisan, vm with a domain, ...) you are running it.

# Environment
'env' => env('APP_ENV', 'production'),
# Debug mode
'debug' => env('APP_DEBUG', false),
'url' => env('APP_URL', 'http://localhost'),

Define your environment file, at the root of your project directory.

# Copy the environment template
cp .env.example .env

Generate the key for your environment file, it will define the value for 'APP_KEY='

php artisan key:generate

Edit then the .env file to suit your needs (APP_*, DB_*, ...).

Finish by clearing the config and generate the cache.

php artisan config:clear
php artisan config:cache

Time to check your site, depending on your environment, for development, the easiest way is to use Artisan.

php artisan serve



Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.