Custom Utilities for Laravel 4
This package contains custom Laravel application utilities to make installation, configuration, and management of Laravel 4 applications easier and less time consuming., (*1)
The changes made by this package are highly opinionated and are not suitable for everyone., (*2)
Installation Via Composer
Download this installer using Composer., (*3)
$ composer global require "mmanos/laravel-utilities=~1.0"
Make sure to place the ~/.composer/vendor/bin directory in your PATH so the mmanos-laravel executable is found when you run the mmanos-laravel command in your terminal., (*4)
Simply add this directory to your PATH in your ~/.bash_profile (or ~/.bashrc):, (*5)
export PATH=~/.composer/vendor/bin:$PATH
Once installed, the simple mmanos-laravel global composer command will be available to run the project commands listed below., (*6)
Updates Via Composer
To keep this package up to date:, (*7)
$ composer global update mmanos/laravel-utilities
Uninstalling
To remove this package, you edit ~/.composer/composer.json and then run:, (*8)
$ composer global update
Commands
Run the commands below to initialize and/or modify Laravel 4 applications., (*9)
New
Create a fresh Laravel installation with dependencies in the directory you specify.
This command also make's the app/storage/* directories writable., (*10)
$ mmanos-laravel new [directory]
For instance, mmanos-laravel new blog would create a directory named blog containing a fresh Laravel installation., (*11)
Note: This runs the composer create-project command to check out the latest version of Laravel and install it's dependencies., (*12)
Prepare
Prepare a fresh version of Laravel by adding helpful functionality. This command will do the following:, (*13)
- Create app/classes directory and autoload it
- Configure local environment detection
- Install helper functions file
- Configure event callbacks
- Configure the HTTP Exceptions handler
- Enable sending of custom headers in response
- Set app timezone to America/Chicago
- Configure a common site/company name for use throughout the app
- Create a custom model class for other models to extend
- Ignore local config files in Git
- Add Carbon class alias
$ mmanos-laravel prepare
Note: Run from the base directory of the Laravel application., (*14)
Front End
Configure an existing Laravel application with helpful front-end functionality. This command will do the following:, (*15)
- Create assets directory structure
- Install package laravel-casset
- Install package bootstrap
- Install package jquery
- Install library Font Awesome
- Enable IE8 responsive css support (via html5shiv.js and respond.js)
- Create a default layout
- Configure default controllers and views
- Create a default email layout
$ mmanos-laravel frontend
Note: Run from the base directory of the Laravel application., (*16)
Authorize
Configure an existing Laravel application with authorization functionality. This command will do the following:, (*17)
- Create user migrations, models, services, validators, and event handlers
- Create an auth controller along with it's resources
- Create a signup controller along with it's resources
- Install ACL functionality built on the zendframework/zend-permissions-acl package
$ mmanos-laravel authorize
Note: Run from the base directory of the Laravel application., (*18)