在Yii1中,我可以这样做:
$posts=Post::model()->with(array(
'comments'=>array(
'scopes'=>array('recently','approved')
),
))->findAll();
Run Code Online (Sandbox Code Playgroud)
有没有办法在Yii2中的with()的回调函数中调用关系的范围?
Customer::find()->with([
'orders' => function ($query) {
$query->andWhere('status = 1');
},
'country',
])->all();
Run Code Online (Sandbox Code Playgroud) 有没有办法用谷歌的一个字母访问彩色标记?
我只能用字母之类的红色 
但我需要带有字母的绿色标记,就像我从谷歌的方向API中获取它一样.像这样的人
有没有办法用字母访问彩色标记?或者我是否必须将标记添加到我的图像文件夹?