firstcommit
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Billing\Repositories;
|
||||
|
||||
use Modules\Billing\Models\BillingComponent;
|
||||
|
||||
|
||||
class BillingComponentRepository implements BillingComponentInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return BillingComponent::get();
|
||||
}
|
||||
|
||||
public function getBillingComponentById($billingComponentId)
|
||||
{
|
||||
return BillingComponent::findOrFail($billingComponentId);
|
||||
}
|
||||
|
||||
public function delete($billingComponentId)
|
||||
{
|
||||
BillingComponent::destroy($billingComponentId);
|
||||
}
|
||||
|
||||
public function create(array $billingComponentDetails)
|
||||
{
|
||||
return BillingComponent::create($billingComponentDetails);
|
||||
}
|
||||
|
||||
public function update($billingComponentId, array $newDetails)
|
||||
{
|
||||
return BillingComponent::whereId($billingComponentId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return BillingComponent::pluck('title', 'id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user