41 lines
911 B
PHP
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');
|
|
}
|
|
|
|
}
|