StocksNew/Modules/Office/app/Repositories/PurchaseServiceRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

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);
}
}