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

41 lines
911 B
PHP
Raw Permalink Normal View History

2024-08-27 17:48:06 +05:45
<?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');
}
}