Modular Pattern & Module Management for Laravel 5
45
8
2
Package Data
Maintainer Username: furkankadioglu
Maintainer Contact: furkan.kadioglu@gmail.com (Furkan Kadıoğlu)
Package Create Date: 2016-04-29
Package Last Update: 2016-09-16
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:02:23
Package Statistics
Total Downloads: 45
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 8
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Modvel

Modular Pattern & Module Management for Laravel 5

alt tag

Installation

The best way to install this package is through your terminal via Composer.

Add the following line to the composer.json file and fire composer update

"furkankadioglu/modvel": "dev-master"

Once this operation is complete, simply add the service provider to your project's config/app.php

Service Provider
furkankadioglu\Modvel\ModuleServiceProvider::class,

Config

Getting to module config file and generators:

php artisan vendor:publish

Commands

alt tag

  • php artisan module:make [module name]

alt tag

  • php artisan module:list

alt tag

  • php artisan module:migrate [module name]

alt tag

  • php artisan module:migrateall

alt tag

  • php artisan module:delete [module name]
Publish Files
laravel-project/
    config/
    |-- modulemanagement.php
    app/
    |-- BaseHelpers.php
    |-- Models/
        |-- Audio.php
        |-- Document.php
        |-- UploadedFile.php
        |-- Photo.php
        |-- Video.php
    |-- Http/
        |-- Controllers/
            |-- AdminTemplateController.php
            |-- MainTemplateController.php
            |-- AdminController.php
            |-- MainController.php
        |-- Middleware/
            |-- AdminMiddleware.php
    resources/
    |-- views/
        |-- masters/
            |-- admin.blade.php
            |-- main.blade.php

Example: Test Module Files
laravel-project/
    app/
    |-- modules/
        |-- Test
            |-- details.php
            |-- App/
                |-- Controllers/
                    |-- TestAdminSettingsController.php
                    |-- TestAdminController.php
                    |-- TestApiController.php
                    |-- TestController.php
                |-- Middlewares/
                |-- Models/
                    |-- Test.php
                    |-- TestModuleSetting.php
                |-- routes.php
                |-- TestHelpers.php
            |-- Config/
            |-- Resources/
                |-- views/
                    |-- admin/
                        |-- default/
                            |-- index.blade.php
                            |-- show.blade.php
                            |-- destroy.blade.php
                            |-- edit.blade.php
                            |-- create.blade.php
                            |-- settings/
                                |-- index.blade.php
                                |-- create.blade.php
                                |-- destroy.blade.php
                    |-- default/
                        |-- index.blade.php
                        |-- show.blade.php
                |-- lang/
                    |-- en/
                        |-- general.php
                    |-- tr/
                        |-- general.php
            |-- Database/
                |-- seeds/
                |-- migrations/
                    |-- 2016_01_01_010101_Test.php
                    |-- 2016_01_01_010101_TestSettings.php