Im a super newbie here ,help me please

i make a simple attendance system where employee have time in and out, im confuse how to make logical if in time in and out ,im trying give option value but i dont know how to start.
there’s siteController

public function actionAbsen()

{
$karyawan=Pegawai::find()->all();
$listkaryawan=ArrayHelper::map($karyawan,‘id’,‘nama’);
$model=new Absen();

if($model->load(yii::$app->request->post())) {

    $model->tanggal=date('Y-m-d');
    $model->jam_masuk=date('H:i:s');
    $model->save();
    

return $this->redirect(['absen/view', 'id' => $model->id]);

}

 return $this->render('absen',[
    'listkaryawan' => $listkaryawan,
    'model'=>$model

 ]);

}
}

there’s view layout

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\select2\Select2;
use yii\widgets\Pjax;
use common\models\Pegawai;

/* @var $this yii\web\View */
/* @var $model common\models\Pegawai */
/* @var $form yii\widgets\ActiveForm */

$this->title = 'absen';
?>

                        <?php $form = ActiveForm::begin(); ?>
                        
                        <?= $form->field($model, 'karyawan_id')->textInput(['class'=>'contact_us_form row'])->widget(Select2::classname(),[
                        'data' => $listkaryawan,
                        'theme' => Select2::THEME_BOOTSTRAP,
                        'options' => ['placeholder' => 'pilih nama anda disini'],
                        'pluginOptions' => [
                            'allowClear' => true,
                            'width' => '300px',
                            'align' => 'right'
                            
                            
                        ],
                        ]) ?>
                        
                    <div class="contact-us-from-now">
                        <select class="form-control" name="status">
                        <option value="in">absen masuk</option>
                        <option value="out">absen keluar</option>
                        </select>
                    </div>
                        <?= Html::submitButton('pilih', ['class' => 'btn btn-secondary submit_btn']) ?>


                         <?php ActiveForm::end(); ?>

maybe you guys wanna help me

It’s not clear what the problem is.