This repository contains a skeleton to easily create Laravel 8 and Vue.js applications 🚀
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Docker >= 19.03.12
-
Clone the repository from GitLab:
git clone [email protected]:binalogue/laravel-boilerplate.git <YOUR_REPOSITORY_NAME> && cd <YOUR_REPOSITORY_NAME>
If you are cloning this repository to use in another project, please see sections 2 - 4 to get a fresh copy of this boilerplate. If not, skip to section 5.
-
Init Git:
rm -rf .git && git init
-
Setup the project:
npx use-preset ./.presets/setup
- Replace app name (default:
Laravel Boilerplate
) - Replace app short name (default:
Binaplate
) - Replace app description (default:
We ❤️ code
) - Replace repository path (default:
binalogue/laravel-boilerplate
) - Replace repository name (default:
laravel-boilerplate
) - Replace domain name (default:
laravel.binalogue.dev
)
- Replace app name (default:
-
Add other optional presets:
Development environment presets
- apache - Allows you to use Apache instead of Nginx.
- ngrok - Allows you to expose a web server running on your local machine to the internet, with HTTPS support.
Backend presets
- auth - Allows you to add authentication.
- nova - Allows you to use Nova as administration panel for Laravel. (Requires the auth preset.)
- horizon - Allows you to use Horizon to easily monitor key metrics of your queue system.
- telescope - Allows you to use Telescope as debug assistant for Laravel.
Frontend presets
- three - Allows you to install three.js.
Run PHP CS Fixer when the presets have been applied:
composer analyse:phpcsfixer
-
Build the project:
.cli/build.sh
-
Run the project:
.cli/up.sh
You can compile your assets in two ways:
-
Watching assets for changes. This is the default option. The
yarn watch
command will continue running in your terminal and watch all relevant files for changes. Webpack will then automatically recompile your assets when it detects a change.docker-compose exec app yarn watch
-
With support for hot module replacement. You can add HMR support to the assets watcher. Now, you should see your browser instantly refresh to reflect the changes, without losing your state.
docker-compose exec app yarn hot
-
-
Stop the project:
.cli/down.sh
To run all the PHPUnit tests:
composer test
We have set up continuous deployment with Laravel Forge. Every time we push to the master branch, we deploy the new changes to our production environment.
- Laravel - The PHP Framework For Web Artisans
- Composer - Dependency Manager for PHP
- Docker - Enterprise-ready container platform to cost-effectively build and manage your application
- Mikel Goig - Initial work - Frontend and backend development - mikelgoig
- Cristina Fresneda - Initial work - Frontend development - crisfresneda