2017 © Pedro Peláez
 

library laravel-builder

Build rapidly classes based on stubs.

image

jeroen-g/laravel-builder

Build rapidly classes based on stubs.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Laravel Builder

Latest Version on Packagist ![Build Status][ico-travis], (*1)

Build your Laravel application from the command line or, at some point in the future, through an interface., (*2)

Install

Via Composer, (*3)

``` bash $ composer require jeroen-g/laravel-builder, (*4)


In config/app.php add ``` php JeroenG\LaravelBuilder\LaravelBuilderServiceProvider::class,

Usage

In your code

An instance of the builder class is binded in the service provider. You can use the Builder in your code in one of the following ways. Stubs are searched in the stubs/ directory, so run the command first (see next section)., (*5)

  1. With variables ``` php $builder->stub = 'model'; // model.stub found in stubs/ $builder->namespace = 'App\Models'; $builder->class = 'Test'; $builder->path = 'app/Models/Test'; // Relative to base_path(). $builder->run()->save(); // Creates and then saves the file. $builder->reset(); // Resets the variables for a completely new build process.

2. With an array ``` php $builder->fromArray([ 'stub' => 'model', 'namespace' => 'App\\Models', 'class' => 'Test', 'path' => 'app/Models/Test' ]); // No need to run() or save() or reset().
  1. With Json ``` php $json = json_encode([ // You could for example have .json files for this. 'stub' => 'model', 'namespace' => 'App\Models', 'class' => 'Test', 'path' => 'app/Models/Test' ]); $builder->fromJson($json); // No need to run() or save() or reset().

### The command line You can also use the following commands. 1. Publish all the included stubs to the `stubs/` directory. ``` bash $ php artisan build:stubs

You can add your own stubs to this directory as well. It currently ships with very little stubs, if you have made your own, feel free to add them to the package with a Pull Request., (*6)

  1. Building a file ``` bash $ php artisan build model App\Models Test app/Models/Test

### Through the web interface After installing the package and publishing the stubs, the web interface is accessible by visiting `/builder`. You can create single files or a resource (controller, model, form request, policy, migration, views). ## Change log Please see [changelog](changelog.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see contributing for details., (*7)

Credits

License

The EUPL License. Please see the License File for more information., (*8)

The Versions

20/06 2017

dev-laravel55

dev-laravel55 https://github.com/Jeroen-G/laravel-builder

Build rapidly classes based on stubs.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel classes package builder build

29/05 2016

dev-master

9999999-dev https://github.com/Jeroen-G/laravel-builder

Build rapidly classes based on stubs.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel classes package builder build

17/03 2016

v0.2

0.2.0.0 https://github.com/Jeroen-G/laravel-builder

Build rapidly classes based on stubs.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel classes package builder build

04/03 2016

v0.1

0.1.0.0 https://github.com/Jeroen-G/laravel-builder

Build rapidly classes based on stubs.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

laravel classes package builder build