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

41 lines
852 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?php
namespace Modules\Recruit\Repositories;
use Modules\Recruit\Models\OfferLetter;
class OfferLetterRepository implements OfferLetterInterface
{
public function findAll()
{
return OfferLetter::get();
}
public function getOfferLetterById($offerLetterId)
{
return OfferLetter::findOrFail($offerLetterId);
}
public function delete($offerLetterId)
{
OfferLetter::destroy($offerLetterId);
}
public function create(array $offerLetterDetails)
{
return OfferLetter::create($offerLetterDetails);
}
public function update($offerLetterId, array $newDetails)
{
return OfferLetter::where('offer_letter_id', $offerLetterId)->update($newDetails);
}
public function pluck()
{
return OfferLetter::pluck('title', 'offer_letter_id');
}
}