I'm getting Calling unknown method: app\modules\employee\models\NewEmployeeForm::save() error when trying to do $model->save();
I assumed save() method is inherited from Model, but then this happened. Do I need to write my own save method? I want to follow the yii2 way of doing things.
below is my model
thanks in advance
use common\models\User;
use yii\base\Model;
use Yii;
/**
* Signup form
*/
class NewEmployeeForm extends Model
{
public $nik;
public $pin;
public $company_id;
public $category_id;
public $first_name;
public $last_name;
/**
* @inheritdoc
*/
public function rules()
{
return [
[['pin', 'company_id', 'category_id'], 'integer'],
[['nik'], 'string', 'max' => 255],
[['first_name', 'last_name'], 'string', 'max' => 255],
];
}
}