Download the PHP package calject/laravel-productivity without Composer
On this page you can find all versions of the php package calject/laravel-productivity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download calject/laravel-productivity
More information about calject/laravel-productivity
Files in calject/laravel-productivity
Download calject/laravel-productivity
More information about calject/laravel-productivity
Files in calject/laravel-productivity
Please rate this library. Is it a good library?
Informations about the package laravel-productivity
laravel-productivity
- 安装
- 一、Components
- 1. Rules
- 2. 注解路由实现
- 二、Commands
- 1. 创建类顶部注释
- 2. 创建数据库模型字段注释
- 3. 生成env映射配置文件
- 4. 查看队列列表
安装
v0.2.5
添加队列显示命令
calject:queue:list
v0.2.*
添加路由注解实现
AnnotationRoute
一、Components
1.Rules
示例: 在
resources/lang/en
或者resources/lang/en
(根据app.php配置)下定义键及验证规则生成验证规则数组
2.注解路由实现
AnnotationRouteLocalProvider
、AnnotationRouteProvider
、AnnotationRoute
服务提供者注册实现
config/app.php
=> 'providers' 属性中添加AnnotationRouteLocalProvider
或AnnotationRouteProvider
服务提供者
AnnotationRouteLocalProvider
仅在env环境为local中生效,AnnotationRouteProvider
在所有环境中生效, 可通过AnnotationRoute
的env
方法设置
自定义实现
app/Providers/RouteServiceProvider.php
中添加注解实现AnnotationRoute
使用
-
Class顶部注释(可选)
- @route()
- prefix(string $prefix)
prefix='test'
- middleware(string $middleware)
middleware='api'
、middleware='api,mid,mid2'
- prefix(string $prefix)
- 示例
@route(prefix='test', middleware='api,mid,mid2')
- @route()
-
Method 可选注释
- @api(string $path)
@api('test/TestA')
、@api(test/TestA)
- @method(string $method)
@method('get')
、@method('get,post,put,delete')
- @middleware(string $middleware)
@middleware('test')
、@middleware('test,mid,mid2')
- @name(string $value)
@name('TestControllerTestA')
、@name(TestControllerTestA)
- @prefix(string $prefix)
@prefix('test')
、@prefix(test)
- @api(string $path)
-
示例
- 执行
php artisan route:list
查看路由列表
二、Commands
1.calject:comment:data
-
创建类属性顶部(get/set/apt/property)注释
- 生成示例
2.calject:comment:model
-
创建数据库模型类属性注释
- 创建示例
3.calject:config:env
-
根据
.env
文件生成config/env.php
文件 - 生成示例
4.calject:queue:list
-
显示队列关系列表
- 示例
All versions of laravel-productivity with dependencies
PHP Build Version
Package Version
The package calject/laravel-productivity contains the following files
Loading the files please wait ....