• Stars
    star
    143
  • Rank 256,221 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create

Foreman

Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create. The directives you want Forman to perform are outlined in a JSON based template file.

Build Status Code Coverage Scrutinizer Code Quality

README Contents

## What does it do?
  • Structure
    • Copy files and directories
    • Move files and directories
    • Delete files and directores
    • Touch files
    • Make new directories
  • Composer
    • Require composer package dependencies
    • Require development composer package dependencies
    • Manage the composer autoload > classmap
    • Manage the composer autoload > psr-0 settings
    • Manage the composer autoload > psr-4 settings
## Installation ### Download the PHAR The simplest method of installation is to simply [download the foreman.phar](https://github.com/indatus/foreman/raw/master/foreman.phar) file from this repository. > **(Optional) Move and set permissions** Now if you'd like you can move the PHAR to `/usr/local/bin` as `foreman` for easy access. You may need to grant the file execution privileges (`chmod +x`) before running commands. ### Compile from source To compile the foreman.phar file yourself, clone this repository and run the `box build` command. To run box commands, you must install [kherge/Box](https://github.com/kherge/Box).

See optional move and permissions above.

### Install with Homebrew

You can also install Foreman via Homebrew. If you don't already have homebrew installed, you can install it with:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Next you'll need to add the sources necessary to install foreman:

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap josegonzalez/homebrew-php

Now update all formulae

brew update

And then install Foreman

brew install foreman
### Updating Foreman

To update Foreman, you may use the foreman self-update command.

## Scaffolding a Template

To get started you'll want to generate a default / blank Foreman template. You can do this with the command:

foreman scaffold /path/to/my/template.json

Note: If you provide a directory instead of a file, Foreman will create a foreman-tpl.json file in the given directory.

A default Foreman template looks like this:

{
    "structure": {
        "copy": [
            {
                "from": "",
                "to": ""
            }
        ],
        "move": [
            {
                "from": "",
                "to": ""
            }
        ],
        "delete": [

        ],
        "touch": [

        ],
        "mkdir": [

        ]
    },
    "composer": {
        "require": [
            {
                "package": "laravel/framework",
                "version": "4.1.*"
            }
        ],
        "require-dev": [
            {
                "package": "",
                "version": ""
            }
        ],
        "autoload": {
            "classmap": [
                "app/commands",
                "app/controllers",
                "app/models",
                "app/database/migrations",
                "app/database/seeds",
                "app/test/TestCase.php"
            ],
            "psr-0": [

            ],
            "psr-4": [

            ]
        }
    }
}
### Working with a template

For structure references you can use either an absolute path (to a file or directory) or a path relative to your new application's root.

## Build a Laravel app from a template

In order to use your Foreman template to generate a new Laravel application you just need to use the build command.

The first argument is the absolute path to where you want to install the application, the second argument is the location of the template file.

foreman build /install/app/here /path/to/template.json

Now Foreman will generate your Laravel app with all your configuration applied.

More Repositories

1

dispatcher

Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.
PHP
1,061
star
2

trucker

A PHP package for mapping remote API resources (usually RESTful) as models in an ActiveResource style
PHP
423
star
3

blacksmith

Blacksmith is a code generation tool which automates the creation of common files that you'd typically create for each entity in your application.
PHP
193
star
4

ranger

PHP
84
star
5

laravel-PSRedis

PHP
48
star
6

objc-gitlab-api

Objective-C Gitlab Wrapper
Objective-C
17
star
7

guardian

Guardian is a Laravel package that allows you to protect more than just the production environment from potentially destructive tasks
PHP
9
star
8

Android-SmoothSeekBar

An abstraction of Android's SeekBar that animates smoothly.
Java
8
star
9

ActiveResource

A clean and simple PHP Active Resource library
PHP
7
star
10

paladin

Android Dependency Manager for libraries that aren't packaged as .jar or .aar.
Python
7
star
11

gopher

Gopher is a CLI tool for automated testing of telecom dial-in apps.
PHP
6
star
12

timber

Improved Android logging.
Java
5
star
13

GitLabViewer-iOS

Native iOS application to view and edit information on a GitLab server.
CSS
3
star
14

maria-db

Chef cookbook for the installation and configuration of a MariaDB cluster
HTML
2
star
15

assembler

Assembler allows you to easily construct and package docker containers using existing config scripts.
PHP
2
star
16

blacksmith-contracts

Interfaces used by Blacksmith generators
PHP
2
star
17

Android-SwipeControl

Simple library to add swiping functionality to a View.
Java
1
star
18

indatus.github.io

Indatus GitHub Page
CSS
1
star
19

apache-php54

Chef cookbook for setting up apache with PHP 5.4
HTML
1
star
20

jenkinsci

Our flavor of the official Jenkins Docker image
1
star