mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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 = [
|
||||
'client',
|
||||
'company',
|
||||
// 'client',
|
||||
// 'company',
|
||||
];
|
||||
|
||||
public function company()
|
||||
|
@ -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();
|
||||
});
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user