Skip to main content

officelifehq/officelife

949 stars
2 code files
View officelifehq/officelife on GitHub

app/Models/Company/CompanyCalendar.php

Open in GitHub
use Illuminate\Database\Eloquent\Model;
 
class CompanyCalendar extends Model
{
//
protected $casts = [
'is_worked' => 'boolean',
];
//
}

app/Services/Company/Adminland/CompanyPTOPolicy/UpdateCompanyPTOPolicy.php

Open in GitHub
use App\Services\BaseService;
use App\Models\Company\CompanyCalendar;
 
class UpdateCompanyPTOPolicy extends BaseService
{
//
private function markDaysOff(array $data): int
{
//
CompanyCalendar::where('id', $companyCalendar->id)->update([
'is_worked' => $change['is_worked'],
]);
//
}
}