first commit
This commit is contained in:
35
Modules/Admin/app/Repositories/CasteRepository.php
Normal file
35
Modules/Admin/app/Repositories/CasteRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Caste;
|
||||
|
||||
|
||||
class CasteRepository implements CasteInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Caste::get();
|
||||
}
|
||||
|
||||
public function getCasteById($casteId)
|
||||
{
|
||||
return Caste::findOrFail($casteId);
|
||||
}
|
||||
|
||||
public function delete($casteId)
|
||||
{
|
||||
Caste::destroy($casteId);
|
||||
}
|
||||
|
||||
public function create(array $casteDetails)
|
||||
{
|
||||
return Caste::create($casteDetails);
|
||||
}
|
||||
|
||||
public function update($casteId, array $newDetails)
|
||||
{
|
||||
return Caste::where('id', $casteId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user