Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/ts.corals.io/corals-api/Corals/modules/Timesheet/update-batches/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/ts.corals.io/corals-api/Corals/modules/Timesheet/update-batches/1.0.29.php
<?php

use Corals\Modules\Utility\Facades\ListOfValue\ListOfValues;
use Corals\Modules\Utility\Models\ListOfValue\ListOfValue;
use Corals\Settings\Models\Setting;

$parentPositions = ListOfValue::query()->create([
    'code' => 'positions',
    'label' => 'Positions',
    'value' => 'Positions',
    'module' => 'Timesheet'
]);

$optionsPositions = [
    'junior' => [
        'label' => 'Junior',
        'value' => 'Junior',
        'module' => 'Timesheet'
    ],
    'mid' => [
        'label' => 'Mid',
        'value' => 'Mid',
        'module' => 'Timesheet'
    ],
    'senior' => [
        'label' => 'Senior',
        'value' => 'Senior',
        'module' => 'Timesheet'
    ]
];

ListOfValues::insertListOfValuesChildren($parentPositions, $optionsPositions);

$parentEmployeeType = ListOfValue::query()->create([
    'code' => 'employee_type',
    'label' => 'Employee Type',
    'value' => 'Employee Type',
    'module' => 'Timesheet'
]);

$optionsEmployeeType = [
    'part_time' => [
        'label' => 'Part Time',
        'value' => 'Part Time',
        'module' => 'Timesheet'
    ],
    'full_time' => [
        'label' => 'Full Time',
        'value' => 'Full Time',
        'module' => 'Timesheet'
    ],
    'trainee' => [
        'label' => 'Trainee',
        'value' => 'Trainee',
        'module' => 'Timesheet'
    ]
];

ListOfValues::insertListOfValuesChildren($parentEmployeeType, $optionsEmployeeType);

Setting::query()->whereIn('code', ['employee_type', 'positions'])->delete();

Spamworldpro Mini