first commit
This commit is contained in:
40
Modules/Recruit/app/Repositories/OfferLetterRepository.php
Normal file
40
Modules/Recruit/app/Repositories/OfferLetterRepository.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user