diff --git a/app/Repositories/PurchaseOrderRepository.php b/app/Repositories/PurchaseOrderRepository.php index cf0653c25c..d620fdcdd1 100644 --- a/app/Repositories/PurchaseOrderRepository.php +++ b/app/Repositories/PurchaseOrderRepository.php @@ -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(); + } }