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