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

41 lines
852 B
PHP

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