admin module added
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\PromotionDemotion;
|
||||
|
||||
|
||||
class PromotionDemotionRepository implements PromotionDemotionInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return PromotionDemotion::get();
|
||||
}
|
||||
|
||||
public function getPromotionDemotionById($promotionDemotionId)
|
||||
{
|
||||
return PromotionDemotion::findOrFail($promotionDemotionId);
|
||||
}
|
||||
|
||||
public function delete($promotionDemotionId)
|
||||
{
|
||||
PromotionDemotion::destroy($promotionDemotionId);
|
||||
}
|
||||
|
||||
public function create(array $promotionDemotionDetails)
|
||||
{
|
||||
return PromotionDemotion::create($promotionDemotionDetails);
|
||||
}
|
||||
|
||||
public function update($promotionDemotionId, array $newDetails)
|
||||
{
|
||||
return PromotionDemotion::where('promotion_demotion_id', $promotionDemotionId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user