From 6650f5404fc64c5a54046edbcbbd14a3bdeff79a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 27 Oct 2020 15:26:56 +1100 Subject: [PATCH] Fixes for camelcase Invitation names --- app/Utils/PhantomJS/Phantom.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Utils/PhantomJS/Phantom.php b/app/Utils/PhantomJS/Phantom.php index 2334a85a99f0..9f0d849add95 100644 --- a/app/Utils/PhantomJS/Phantom.php +++ b/app/Utils/PhantomJS/Phantom.php @@ -12,17 +12,18 @@ namespace App\Utils\PhantomJS; use App\Designs\Designer; -use App\Services\PdfMaker\Design as PdfDesignModel; -use App\Services\PdfMaker\PdfMaker as PdfMakerService; use App\Models\CreditInvitation; use App\Models\Design; use App\Models\InvoiceInvitation; use App\Models\QuoteInvitation; +use App\Services\PdfMaker\Design as PdfDesignModel; use App\Services\PdfMaker\Design as PdfMakerDesign; +use App\Services\PdfMaker\PdfMaker as PdfMakerService; use App\Utils\HtmlEngine; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Storage; +use Illuminate\Support\Str; class Phantom { @@ -85,7 +86,7 @@ class Phantom $key = $entity.'_id'; - $invitation_instance = 'App\Models\\'.ucfirst($entity).'Invitation'; + $invitation_instance = 'App\Models\\'.Str::camel(ucfirst($entity)).'Invitation'; $invitation = $invitation_instance::whereRaw('BINARY `key`= ?', [$invitation_key])->first();