I have ticket.php and employee.php
In my ticket.php once I create a ticket it will automatically get the employee_id from the employee.php by using arrayhelper but how do I randomise it? once I create a ticket it will get the employee_id randomly? Right now mine is now currently not getting it randomly ids it gets the same id always.
In my ticketcontroller
use app\models\Ticket;
use app\models\Employee;
public function actionCreate()
{
$model = new Ticket();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
$model->time_start = date('y-m-d h:i:s');
$model->status = ('On Going');
[b]$model->employee_respond_id = ('id');[/b]
return $this->render('create', [
'model' => $model,
]);
}
}