diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index 443c1437fcfa..cb2ad71021f7 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -49,8 +49,8 @@ class RecurringInvoice extends BaseModel ]; protected $with = [ - 'client', - 'company', + // 'client', + // 'company', ]; public function company() diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 7547c292e611..674ba882fe43 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -42,6 +42,10 @@ class RouteServiceProvider extends ServiceProvider return \App\Models\Invoice::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail(); }); + Route::bind('recurring_invoice', function ($value) { + return \App\Models\RecurringInvoice::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail(); + }); + Route::bind('quote', function ($value) { return \App\Models\Quote::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail(); }); diff --git a/tests/Feature/QuoteTest.php b/tests/Feature/QuoteTest.php index 834dd56e018c..b8224d4dfc7c 100644 --- a/tests/Feature/QuoteTest.php +++ b/tests/Feature/QuoteTest.php @@ -160,7 +160,7 @@ class QuoteTest extends TestCase $quote = Quote::where('user_id',$user->id)->first(); $quote->settings = $client->getMergedSettings(); $quote->save(); - Log::error(print_r($quote,1)); + $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $token,