first commit
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Office\Repositories;
|
||||
|
||||
use Modules\Office\Models\PurchaseService;
|
||||
|
||||
|
||||
class PurchaseServiceRepository implements PurchaseServiceInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return PurchaseService::get();
|
||||
}
|
||||
|
||||
public function getPurchaseServiceById($purchaseServiceId)
|
||||
{
|
||||
return PurchaseService::findOrFail($purchaseServiceId);
|
||||
}
|
||||
|
||||
public function delete($purchaseServiceId)
|
||||
{
|
||||
PurchaseService::destroy($purchaseServiceId);
|
||||
}
|
||||
|
||||
public function create(array $purchaseServiceDetails)
|
||||
{
|
||||
return PurchaseService::create($purchaseServiceDetails);
|
||||
}
|
||||
|
||||
public function update($purchaseServiceId, array $newDetails)
|
||||
{
|
||||
return PurchaseService::where('id', $purchaseServiceId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user