cumulati / distributed-laravel
0.3.2
2020-03-26 16:02 UTC
Requires
- laravel/framework: ~5.7|~7.0
Requires (Dev)
- mockery/mockery: ~1.2
- orchestra/testbench: ~3.7
- phpunit/phpunit: ~8.0
This package is auto-updated.
Last update: 2024-09-11 08:45:56 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' ];