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

41 lines
911 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?php
namespace Modules\Recruit\Repositories;
use Modules\Recruit\Models\JobApplication;
class JobApplicationRepository implements JobApplicationInterface
{
public function findAll()
{
return JobApplication::get();
}
public function getJobApplicationById($jobApplicationId)
{
return JobApplication::findOrFail($jobApplicationId);
}
public function delete($jobApplicationId)
{
JobApplication::destroy($jobApplicationId);
}
public function create(array $jobApplicationDetails)
{
return JobApplication::create($jobApplicationDetails);
}
public function update($jobApplicationId, array $newDetails)
{
return JobApplication::where('job_application_id', $jobApplicationId)->update($newDetails);
}
public function pluck()
{
return JobApplication::pluck('name', 'job_application_id');
}
}