36 lines
801 B
PHP
36 lines
801 B
PHP
|
<?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);
|
||
|
}
|
||
|
|
||
|
}
|