Skip to content

Instantly share code, notes, and snippets.

@malitta
Last active September 9, 2020 10:58
Show Gist options
  • Save malitta/58c3cef69653051a55e9c59a0505e1c0 to your computer and use it in GitHub Desktop.
Save malitta/58c3cef69653051a55e9c59a0505e1c0 to your computer and use it in GitHub Desktop.
Things to do when getting started with a Laravel project

Setting up

Fresh installation

If you use composer create-project --prefer-dist laravel/laravel blog to create a Laravel project

  • chmod -R 777 storage bootstrap/cache

Clone Laravel source

If you use git clone git@github.com:laravel/laravel.git

  • composer install
  • chmod -R 777 storage bootstrap/cache
  • cp .env.example .env
  • php artisan key:generate

Linking docker and cleaning up the boilerplate code

<Project Name>

This contains the application code for the <Project Name>. The app is build on top of Laravel framework which runs on the LAMP stack.

Setting up

Follow these steps to set up the project.

git clone <project.url> <project>
cd <project>
composer install
chmod -R 777 storage bootstrap/cache
cp .env.example .env

Change the values of the .env file as necessary.

Running app using docker

Make sure you have Docker installed and running.

cp docker-compose.yml.example docker-compose.yml

Change values of the yml file if necessary (eg: port numbers)

docker-compose up -d

Testing

You can execute the tests by running the following command.

./vendor/bin/phpunit --tap

Deploying app to production

Follow the instructions mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment