slider23/laravel-modulator

There is no license information available for the latest version (v1.2.0) of this package.

Artisan-generator for easy creating module in your Laravel namespace-based application.

v1.2.0 2014-08-22 14:03 UTC

This package is not auto-updated.

Last update: 2024-03-25 23:26:37 UTC


README

Artisan generator for easy creating module in your Laravel namespace-based application.

687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c6964657232332f6c61726176656c2d6d6f64756c61746f722e7376673f7374796c653d666c6174

Installation

Require this package in your composer.json and run composer update (or run composer require slider23/laravel-modulator:1.* directly):

"slider23/laravel-modulator": "1.*"

After updating composer, add the ServiceProvider to the providers array in app/config/app.php

'Slider23\LaravelModulator\LaravelModulatorServiceProvider',

Usage

Run Artisan command:

php artisan modulator --path=app/Acme User --template=default

where Acme - namespace of your application (must be in autoload section of composer.json) User - name of module for create. default - folder with files of template, defined in config.php . 'default' is devault value, also available template 'formvalidation' with validator an model presenter of Jeffrey Way (https://github.com/laracasts). --template is optional.

In folder app/Acme will be created:

Module structure

Add Acme\User\UserServiceProvider to the providers array in app/config/app.php. Module is ready to work !

Customization

To change module structure clone config to your app:

php artisan config:publish slider23/laravel-modulator

and add path to your folder of template to app/config/packages/slider23/laravel-modulator/config.php:

return array(
	'templates_path' =>
		array(
			'default' => "vendor/slider23/laravel-modulator/src/Slider23/LaravelModulator/templates/default/",
			'formvalidation' => "vendor/slider23/laravel-modulator/src/Slider23/LaravelModulator/templates/formvalidation/",
			'myowntemplate' => "app/storage/my_module_template/"
		)
);