mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 01:14:33 -04:00
formatting
This commit is contained in:
parent
46b5230a48
commit
04ed1d4fe3
@ -185,61 +185,60 @@ class BaseController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$transformer = new $this->entity_transformer($this->serializer);
|
$transformer = new $this->entity_transformer($this->serializer);
|
||||||
|
|
||||||
$updated_at = request()->has('updated_at') ? request()->input('updated_at') : 0;
|
$updated_at = request()->has('updated_at') ? request()->input('updated_at') : 0;
|
||||||
$updated_at = date('Y-m-d H:i:s', $updated_at);
|
$updated_at = date('Y-m-d H:i:s', $updated_at);
|
||||||
|
|
||||||
$query->with(
|
$query->with(
|
||||||
[
|
[
|
||||||
'company' => function ($query) use($updated_at){
|
'company' => function ($query) use($updated_at){
|
||||||
$query->whereNotNull('updated_at');
|
$query->whereNotNull('updated_at');
|
||||||
},
|
},
|
||||||
'company.clients'=>function ($query) use($updated_at){
|
'company.clients' => function ($query) use($updated_at){
|
||||||
$query->where('clients.updated_at', '>=', $updated_at)->with('contacts');
|
$query->where('clients.updated_at', '>=', $updated_at)->with('contacts');
|
||||||
},
|
},
|
||||||
'company.tax_rates'=>function ($query) use($updated_at){
|
'company.tax_rates' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.groups'=>function ($query) use($updated_at){
|
'company.groups' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.company_gateways'=>function ($query) use($updated_at){
|
'company.company_gateways' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('gateway');
|
$query->where('updated_at', '>=', $updated_at)->with('gateway');
|
||||||
},
|
},
|
||||||
'company.products'=>function ($query) use($updated_at){
|
'company.products' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.invoices'=>function ($query) use($updated_at){
|
'company.invoices'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('invitations','company','documents');
|
$query->where('updated_at', '>=', $updated_at)->with('invitations','company','documents');
|
||||||
},
|
},
|
||||||
'company.payments'=>function ($query) use($updated_at){
|
'company.payments'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('paymentables');
|
$query->where('updated_at', '>=', $updated_at)->with('paymentables');
|
||||||
},
|
},
|
||||||
'company.quotes'=>function ($query) use($updated_at){
|
'company.quotes'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('invitations','documents');
|
$query->where('updated_at', '>=', $updated_at)->with('invitations','documents');
|
||||||
},
|
},
|
||||||
'company.credits'=>function ($query) use($updated_at){
|
'company.credits'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('invitations','documents');
|
$query->where('updated_at', '>=', $updated_at)->with('invitations','documents');
|
||||||
},
|
},
|
||||||
'company.payment_terms'=>function ($query) use($updated_at){
|
'company.payment_terms'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.vendors'=>function ($query) use($updated_at){
|
'company.vendors'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('contacts');
|
$query->where('updated_at', '>=', $updated_at)->with('contacts');
|
||||||
},
|
},
|
||||||
'company.expenses'=>function ($query) use($updated_at){
|
'company.expenses'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.tasks'=>function ($query) use($updated_at){
|
'company.tasks'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.projects'=>function ($query) use($updated_at){
|
'company.projects'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.designs'=>function ($query) use($updated_at){
|
'company.designs'=> function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class QueryLogging
|
|||||||
Log::info($request->method() . ' - ' . $request->url() . ": $count queries - " . $time);
|
Log::info($request->method() . ' - ' . $request->url() . ": $count queries - " . $time);
|
||||||
|
|
||||||
// if($count > 700)
|
// if($count > 700)
|
||||||
Log::info($queries);
|
// Log::info($queries);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user