1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00

INA-6 | add getInvitationByKey method to purchase order repository.

This commit is contained in:
Nikola Cirkovic 2022-06-05 04:41:04 +02:00
parent 426e8967d1
commit 79f189d0e8

View File

@ -13,6 +13,7 @@ namespace App\Repositories;
use App\Models\PurchaseOrder;
use App\Models\PurchaseOrderInvitation;
use App\Utils\Traits\MakesHash;
class PurchaseOrderRepository extends BaseRepository
@ -30,5 +31,9 @@ class PurchaseOrderRepository extends BaseRepository
return $purchase_order;
}
public function getInvitationByKey($key) :?PurchaseOrderInvitation
{
return PurchaseOrderInvitation::where('key', $key)->first();
}
}