StocksNew/Modules/Recruit/app/Repositories/InterviewScheduleRepository.php

36 lines
856 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?php
namespace Modules\Recruit\Repositories;
use Modules\Recruit\Models\InterviewSchedule;
class InterviewScheduleRepository implements InterviewScheduleInterface
{
public function findAll()
{
return InterviewSchedule::get();
}
public function getInterviewScheduleById($interviewScheduleId)
{
return InterviewSchedule::findOrFail($interviewScheduleId);
}
public function delete($interviewScheduleId)
{
InterviewSchedule::destroy($interviewScheduleId);
}
public function create(array $interviewScheduleDetails)
{
return InterviewSchedule::create($interviewScheduleDetails);
}
public function update($interviewScheduleId, array $newDetails)
{
return InterviewSchedule::where('interview_schedule_id', $interviewScheduleId)->update($newDetails);
}
}