StocksNew/Modules/Recruit/app/Repositories/JobApplicationRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

41 lines
911 B
PHP

<?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');
}
}