From af183e6a22f710f36802ca129afed599cae3884c Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 29 Sep 2020 12:21:17 +0800 Subject: [PATCH] allow admin to create po --- app/Http/Controllers/InvoiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index bd00e679..0cdb35f2 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -82,7 +82,7 @@ class InvoiceController extends Controller } // user_id in booking does not match - if ($booking->user_id !== $user->id) { + if ($booking->user_id !== $user->id && $user->role !== 'admin') { return response()->json([ 'message' => 'Booking does not belongs to you.' ], 403);