mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:14:35 -04:00
Fix Recurring implicit binding
This commit is contained in:
parent
7985315335
commit
7b62c50f90
@ -49,8 +49,8 @@ class RecurringInvoice extends BaseModel
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $with = [
|
protected $with = [
|
||||||
'client',
|
// 'client',
|
||||||
'company',
|
// 'company',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function company()
|
public function company()
|
||||||
|
@ -42,6 +42,10 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
return \App\Models\Invoice::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
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) {
|
Route::bind('quote', function ($value) {
|
||||||
return \App\Models\Quote::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
return \App\Models\Quote::withTrashed()->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
||||||
});
|
});
|
||||||
|
@ -160,7 +160,7 @@ class QuoteTest extends TestCase
|
|||||||
$quote = Quote::where('user_id',$user->id)->first();
|
$quote = Quote::where('user_id',$user->id)->first();
|
||||||
$quote->settings = $client->getMergedSettings();
|
$quote->settings = $client->getMergedSettings();
|
||||||
$quote->save();
|
$quote->save();
|
||||||
Log::error(print_r($quote,1));
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $token,
|
'X-API-TOKEN' => $token,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user