/** * Fired before creating an assignment. * * @param AssignmentInterface|AssignmentModel $model */ public function creating(AssignmentInterface $model) { $model->sort_order = $model->newQuery()->count('id') + 1; }
/** * Fired before creating an assignment. * * @param AssignmentInterface|AssignmentModel $model */ public function creating(AssignmentInterface $model) { $model->sort_order = $model->newQuery()->count('id') + 1; }