This project is designed to be easily deployed on heroku. It contains the following configuration:
- Procfile with a web process.
- Database configuration Defaults to use Postgres using heroku-postgres
DATABASE_URL
environment variable. - Configured to trust the Heroku Load balancers.
1. Database, app key, .env
Clone this repository and run the following commands:
cp .env.example .env
composer install
php artisan key:generate
touch database/database.sqlite
php artisan migrate
2. Run
php artisan serve
1. Create a Heroku App with postgres addon
Set your own app name on line 1 below
app_name=one-eighty-test
heroku apps:create $app_name
heroku addons:create heroku-postgresql:hobby-dev --app $app_name
2. Add Heroku remote
heroku git:remote --app $app_name
3. Set Config Parameters
To operate correctly you need to set APP_KEY
, APP_LOG
the following prams:
heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)
heroku config:set APP_LOG=errorlog
Additionally, to keep the app in development mode and throwing errors set the following:
heroku config:set APP_ENV=development APP_DEBUG=true APP_LOG_LEVEL=debug
4. Deploy to Heroku
git push heroku master
Trust the load balancer
This project is setup to trust the heroku load balancers. This will help with routing and url generation. For more information see here.
Running a worker process
This Stack Overflow Answer shows a simple addition to the Procfile can run your worker in another process.
Using --daemon
is not necessary in Laravel 5.4 and setting up your queues on redis (or using the DB) is not covered here.
queue: php artisan queue:work redis --sleep=3 --tries=3
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked.
Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The Laravel documentation is thorough, complete, and makes it a breeze to get started learning the framework.
If you're not in the mood to read, Laracasts contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.