---
- hosts: localhost
gather_facts: no
handlers:
- name: restart something
debug: msg="Something restarted"
tasks:
- debug: msg="Special action"
changed_when: true
notify: restart something
role1
meta dependencies subrole
role2
meta dependencies subrole
subrole
handlers
$neutral-10: #14191f;
$neutral-20: #333333;
$neutral-30: #3D4A5C;
$neutrals: ("10": $neutral-10, "20": $neutral-20, "30": $neutral-30);
@each $key, $color in $neutrals {
.text-neutral-#{$key} {
color: $color;
}
}
computed: {
showName(user) {
if (user.name && !user.lastname) {
return 'Some value';
} else if (...) {
...
} else {
return user.name;
}
}
}
SELECT
@day:=DATE_FORMAT(t.`timestamp`, '%Y-%m-%d') `date`
, @success:= (SELECT COUNT(id) FROM `tests` WHERE `totalQuestions` = `correctAnswers` AND DATE_FORMAT(`timestamp`, '%Y-%m-%d') = @day) `success`
, @total:= (SELECT COUNT(id) FROM `tests` WHERE DATE_FORMAT(`timestamp`, '%Y-%m-%d') = @day) `total`
, @success* 100 / @total `percent`
FROM `tests` t
GROUP BY DATE_FORMAT(`timestamp`, '%Y-%m-%d')
public function getManager()
{
return $this->hasOne(UsersModel::className(), ['id' => 'user_id'])->alias('manager');
}
$managers = self::find()
->joinWith([
'manager' => function($query) {
$query->alias('manager');
}
])
->where("manager.role='manager' ")
->groupBy('user_id')
->orderBy('manager.first_name, manager.last_name')
->all();
E_ERROR
в качестве исключения можно только с версии PHP 7.какая по функционалу CMS используется на сайте