StocksNew/Modules/Office/app/Repositories/PurchaseServiceRepository.php

36 lines
801 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?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);
}
}