Laravel app boilerplate using AdminPlus Lite and Bootstrap Layout.
You can see a working live demo of this boilerplate running on Heroku.
- use the Laravel recommended gulp workflow with Laravel Elixir
- import Sass files directly from node_modules using sass-importer-npm
- leverage browserify module system to bundle external vendor scripts and app scripts into a single JavaScript file
- customize AdminPlus Lite Sass colors
- create layouts, pages and partials using Laravel Blade Templates
- deploy a Laravel app using Docker containers
- deploy a Laravel app using Heroku
git clone https://github.com/themekit/adminplus-boilerplate-laravel.git my-project
cd my-project
composer install && npm install
gulp
The complete list of files modified or created in addition to the default Laravel installation.
├── Dockerfile
├── Procfile
├── app
│ └── Http
│ └── routes.php
├── app.json
├── composer.json
├── docker-compose.yml
├── gulpfile.js
├── heroku.nginx.conf
├── package.json
├── public
│ ├── css
│ │ ├── app.css
│ │ └── app.css.map
│ ├── js
│ │ ├── main.js
│ │ └── main.js.map
│ └── vendor
│ └── simplebar.css
└── resources
├── assets
│ ├── js
│ │ └── main.js
│ └── sass
│ ├── _variables.scss
│ └── app.scss
└── views
├── includes
│ ├── content.blade.php
│ └── head.blade.php
├── layouts
│ ├── fixed.blade.php
│ └── fluid.blade.php
├── sidebar.blade.php
└── welcome.blade.php
First, get a free Heroku Account and download the Heroku Toolbelt. Then, login to Heroku:
heroku login
From the project root directory, create a Heroku app. Note that Heroku generates a random name for your app or you can pass parameter to specify your own app name.
heroku create
Configure the Heroku app to use the official PHP buildpack:
heroku buildpacks:set heroku/php
When you created the app with
heroku create
, a git remote (calledheroku
) was also created and associated with your local git repository. To publish the application, you simply have to push to that remote:
git push heroku master
Ensure at least one instance of the application is running:
heroku ps:scale web=1
Visit http://<APP NAME>.herokuapp.com
in your browser to see the Laravel app running.
--
Docker runs any app, anywhere and allows you to package an application with all of its dependencies into a standardized unit for development and compose your application from microservices, without worrying about inconsistencies between development and production environments. Learn more about Docker
The easiest way to get started with docker is by using
docker-machine
anddocker-compose
. The rest of this guide assumes you already have both installed.
docker-machine create dev
docker-machine start dev
Point the local
docker
client to run commands against thedev
docker machine:
eval "$(docker-machine env dev)"
This step is required to be able to change the source code and see its effect on the application in real time in the running docker container.
Update the volume path from
docker-compose.yml
:
For Linux:
volumes:
- .:/app/www
For OS X:
volumes:
- /Users/<YOUR USERNAME>/docker/<YOUR PROJECT NAME>:/app/www
If you are using Docker Machine on Mac or Windows, your Docker daemon has only limited access to your OS X or Windows filesystem. Docker Machine tries to auto-share your /Users (OS X) or C:\Users (Windows) directory.
For Windows:
volumes:
- /c/Users/<YOUR USERNAME>/docker/<YOUR PROJECT NAME>:/app/www
From the root directory of this repository:
docker-compose up -d
The previous command should start a container i.e.
myproject_web_1
but the name could be different. You can verify withdocker ps
. Assuming it'smyproject_web_1
:
docker exec -it myproject_web_1 bash
After starting the container, to see the Laravel app running in your browser you only need to obtain the docker machine IP address and access
http://DOCKER_MACHINE_IP
. You can get the IP by running:
docker-machine ip dev
Documentation for the Laravel framework can be found on the Laravel website.
Get help directly from our team via our Slack channel. Request invite