$model = TestModel::create([ 'status' => StatusEnum::DRAFT(), ]);. You can set the value of an enum field with its textual value: $model->status = 'published';.
確定! 回上一頁