{"id":34650546,"url":"https://github.com/roaatech/laravel-modules","last_synced_at":"2026-04-18T21:35:21.852Z","repository":{"id":56994622,"uuid":"84951179","full_name":"roaatech/laravel-modules","owner":"roaatech","description":"Modules management for laravel 5.1","archived":false,"fork":false,"pushed_at":"2017-04-09T09:01:56.000Z","size":444,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-14T14:13:07.633Z","etag":null,"topics":["laravel","laravel-modules","php"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roaatech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-14T13:18:26.000Z","updated_at":"2017-04-01T13:27:05.000Z","dependencies_parsed_at":"2022-08-21T13:20:41.235Z","dependency_job_id":null,"html_url":"https://github.com/roaatech/laravel-modules","commit_stats":null,"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"purl":"pkg:github/roaatech/laravel-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roaatech%2Flaravel-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roaatech%2Flaravel-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roaatech%2Flaravel-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roaatech%2Flaravel-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roaatech","download_url":"https://codeload.github.com/roaatech/laravel-modules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roaatech%2Flaravel-modules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-modules","php"],"created_at":"2025-12-24T17:55:47.616Z","updated_at":"2026-04-18T21:35:21.844Z","avatar_url":"https://github.com/roaatech.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-modules\nModules management library for laravel 5.1\n\n[![Packagist](https://img.shields.io/packagist/v/itvisionsy/laravel-modules.svg)]()\n[![license](https://img.shields.io/github/license/itvisionsy/laravel-modules.svg)]()\n[![Build Status](https://travis-ci.org/itvisionsy/laravel-modules.svg?branch=master)](https://travis-ci.org/itvisionsy/laravel-modules)\n[![PHP](https://img.shields.io/badge/PHP-5.6+-4F5B93.svg)]()\n[![Laravel](https://img.shields.io/badge/Laravel-5.1-f4645f.svg)]()\n\nAllows modules structure of your project. Each module can have its views, config, routes, controllers, ...\n\n## Installation\n 1. The package relies on the composer PSR-4 loader like all laravel projects. Use the composer command:\n     ```\n    composer require itvisionsy/laravel-modules\n    ```\n 1. Add `\\ItvisionSy\\Laravel\\Modules\\ServiceProvider::class` to providers section in your `config/app.php` file:\n     ```php\n    'providers'=\u003e[\n        //...\n        \\ItvisionSy\\Laravel\\Modules\\ServiceProvider::class,\n    ],\n    ```\n 1. Publish the config file using the command\n    ```\n    php artisan vendor:publish\n    ```\n    This will copy the `modules.php` config file to your `config` folder.\n 1. Modify the `config/modules.php` config file as needed.\n\n## How It Works\nYour modules should go in a root modules folder. By default this is `app/Modules` which maps to the namespace\n`\\App\\Modules`.\n\nEach of your modules will have its own folder inside the modules root folder, the folder will be named after the module\nname, and will map to the namespace `\\App\\Modules\\{ModuleName}`.\n\nEach module will contain a base module definition class, which (by default) will be named `Module.php` and maps to\nthe namespace `\\App\\Modules\\{ModuleName}\\Module`. This class will act as the key generator for the module URLs, routes,\nand other framework-related values.\n\nEach module will contain its data models, controllers, views, routes, and other project files as usual. The `composer`\nPSR-4 loader should take care of loading your module files and classes properly.\n\nYour module controllers (by default go into the `Http/Controllers` folder) should inherite the\n`ItvisionSy\\Laravel\\Modules\\Controller` class to make views rendering and other tasks easier.\n\n## Creating Modules\nTo create a new module, you can use the artisan command\n```\nphp artisan modules:make {id} [{name}] [--url={url}]\n```\nValues of `id`, `name`, and `url` are strings. The name and URL parts are optional. URL will be used to generate the\n  URLs of the module more human friendly. Name is used for human identification and readability only.\n\nThis command will create the basic folder structure inside the modules folder, along with the base module and a sample\nroutes (inside `Http/routes.php`), controller (inside `Http/Controllers/`), and view (inside `Views`).\n\nAs you have the basic structure, you can start creating your files and classes as normal. Nothing special to worry about.\n\n## What is Store Handler\nIt is a feature allows a per-module configuration to be saved in the database, in addition to a flag to identify if a\nmodule is enabled or disabled.\n\nYou need a class that implements the `ItvisionSy\\Laravel\\Modules\\Interfaces\\KeyValueStoreInterface` interface, which\ndefines two methods: `set($key, $value)` and `get($key, $default=null)`.\n\nThere are two ready-made implementations in the `\\ItvisionSy\\Laravel\\Modules\\StoreHandlers\\` namespace, one is calle\n`MysqlSimpleDbStoreHandler` and the other `SqliteSimpleDbStoreHandler`, which utilizes a DB connection (default one\nby default) to store the config in a simple key/value table.\n\nThe feature comes disabled by default by setting the class `\\ItvisionSy\\Laravel\\Modules\\StoreHandlers\\DummyStoreHandler`\nas the store handler. To enable it, just change the `store_handler` config setting in the `config/modules.php` config\nfile to use one of the two classes mentioned above.\n```php\n//config/modules.php config file\n\n'store_handler' =\u003e \\ItvisionSy\\Laravel\\Modules\\StoreHandlers\\SqliteSimpleDbStoreHandler::class,\n\n```\n\nAlso, you need to create the database table for the store. We provided a simple artisan command to do that. After you\nhave configured everything correctly, simply execute the following command:\n`php artisan modules:db:init`\nwhich will take care about creating the database table by executing the following SQL command:\n```sql\nCREATE TABLE IF NOT EXISTS `modules_storage` (\n  `key` VARCHAR(200) UNIQUE NOT NULL PRIMARY KEY,\n  `value` VARCHAR(200) NULL\n);\n```\nYou can create the table manually, and override its name by extending the class and change the `$tableName` property.\n\n\n\n## Thanks\n - [JetBrains](https://www.jetbrains.com/) for the free license of [PHPStorm IDE](https://www.jetbrains.com/phpstorm/specials/phpstorm/phpstorm.html). The great tool I wrote this module with.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froaatech%2Flaravel-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froaatech%2Flaravel-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froaatech%2Flaravel-modules/lists"}