October 大坑小坑
2016-09-20 18:27
218 查看
October 细微的知识点和大坑小坑
1、有关需要进行October backend限制验证的:
必须在Model中使用:
use \October\Rain\Database\Traits\Validation;
2、有关需要使用October 牛逼的排序的时候:
一定不要忘记使用:
use \October\Rain\Database\Traits\NestedTree;
3、(1)fields.yaml 关联课程显示使用:
level:
label: 阶段分类
type: relation
nameFrom: name
span: left
category:
label: 课程分类
type: relation
nameFrom: name
span: left
关联关系需要使用getCategoryOptions()
Tips:数据库名字一定和现实的函数名不相同
(2)columns.yaml 展示先关关联关系的时候
category:
label: 分类
relation: category
select: name
searchable: true
关联关系需要使用getCategoryAttribute()
Tips:数据库名字一定和现实的函数名不相同
1、有关需要进行October backend限制验证的:
必须在Model中使用:
use \October\Rain\Database\Traits\Validation;
2、有关需要使用October 牛逼的排序的时候:
一定不要忘记使用:
use \October\Rain\Database\Traits\NestedTree;
3、(1)fields.yaml 关联课程显示使用:
level:
label: 阶段分类
type: relation
nameFrom: name
span: left
category:
label: 课程分类
type: relation
nameFrom: name
span: left
关联关系需要使用getCategoryOptions()
Tips:数据库名字一定和现实的函数名不相同
(2)columns.yaml 展示先关关联关系的时候
category:
label: 分类
relation: category
select: name
searchable: true
关联关系需要使用getCategoryAttribute()
Tips:数据库名字一定和现实的函数名不相同
相关文章推荐
- 装饰者模式
- 将本地数据库里的表上传至服务器
- [最大费用可行流 || 单纯形] BZOJ 3118 Orz the MST
- Spring属性注入Bean的List属性
- PHP 编码规范
- 原型模式
- sql输入单引号总显示错误 为什么
- 实用SQL语句大全
- 分布式锁的介绍及使用方案
- BZOJ2393: Cirno的完美算数教室 容斥原理
- curl 取得HTTP返回的状态码
- easy ui in action 两个月总结
- Android一点 修改jar的内容
- Zxing扫码流程梳理
- 完美世界2017C++游戏开发笔试编程题
- ssh_pam认证
- hbase快速入门-- java api 操作
- 51单片机之LCD1602的驱动程序
- 操作集合的工具类:Collections
- 支付架构