wedgehr / distributed-laravel
2.0.0
2022-07-24 19:32 UTC
Requires
- laravel/framework: ~9.0
Requires (Dev)
- mockery/mockery: ~1.4
- orchestra/testbench: ~7.0
- php-coveralls/php-coveralls: ~2.2
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-09-25 00:16:48 UTC
README
使用 0.1.1 以兼容 Laravel 5.2
一些服务提供者,以启用按组件分组而不是按类类型分组的 Laravel 项目结构。
安装
composer require optimus/distributed-laravel 0.1.*
使用
定义一个 optimus.components.php
配置文件。例如
<?php return [ 'namespaces' => [ // Define a simple namespace mapping 'Infrastructure' => base_path() . DIRECTORY_SEPARATOR . 'infrastructure', // Here we define a namespace mapping with route config 'Api' => [ 'path' => base_path() . DIRECTORY_SEPARATOR . 'api', 'route' => [ 'middleware' => [ 'requestid' ] ] ], ], // middleware to be applied to all routes within routes.php or routes_protected.php. 'protection_middleware' => [ 'auth:api' ], 'resource_namespace' => 'resources', 'language_folder_name' => 'lang', 'view_folder_name' => 'views' ];