Git Product home page Git Product logo

laravel-modulator's Introduction

laravel-modulator

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

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/"
		)
);

laravel-modulator's People

Contributors

slider23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravel-modulator's Issues

Error

i got error when i add this to my config/app

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

Error

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Acme\\User\\UserServiceProvider' not found","file":"\/Applications\/MAMP\/htdocs\/dolara\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.