After call $model->save();
and i tried to get the last INSERT record id via $model->[PRIMARY KEY NAME]
but the return is just empty string ''
I think it might be a bug.
i also did tried $model->primaryKey but it still got the empty string.
The weird thing is that other model is work just fine...
I check the database structure already and that table has set primary key with auto incremental...
Okay, it's because there has primary key field in the rules... after remove that, it works now
$model->getPrimaryKey();
see get first
Most helpful comment
$model->getPrimaryKey();
see get first