order)) { $maxOrder = self::query()->max('order'); $model->order = is_numeric($maxOrder) ? (int) $maxOrder + 1 : 0; } } }