diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 1ec12ef567f0..870aeeb30589 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -132,8 +132,35 @@ class BaseController extends Controller protected function refreshResponse($query) { + $includes = [ + 'company.tax_rates', + 'company.groups', + 'company.company_gateways.gateway', + 'company.clients.contacts', + 'company.products', + 'company.invoices.invitations.contact', + 'company.invoices.invitations.company', + 'company.invoices.documents', + 'company.payments.paymentables', + 'company.quotes.invitations.contact', + 'company.quotes.invitations.company', + 'company.quotes.documents', + 'company.credits.invitations.contact', + 'company.credits.invitations.company', + 'company.credits.documents', + 'company.payment_terms.company', + 'company.credits.invitations.contact', + 'company.credits.invitations.company', + 'company.vendors.contacts', + 'company.expenses', + 'company.tasks', + 'company.projects', + 'company.designs', + 'company.webhooks', + 'company.tokens_hashed' + ]; -// $this->manager->parseIncludes($includes); + $this->manager->parseIncludes($includes); $this->serializer = request()->input('serializer') ?: EntityTransformer::API_SERIALIZER_ARRAY; @@ -151,7 +178,7 @@ class BaseController extends Controller $query->with( [ 'company' => function ($query) use($updated_at){ - $query->whereNotNull('updated_at'); + $query->where('updated_at', '>=', date('Y-m-d H:i:s', 0)); }, 'company.clients'=>function ($query) use($updated_at){ $query->where('clients.updated_at', '>=', $updated_at)->with('contacts'); @@ -422,6 +449,8 @@ class BaseController extends Controller $data['report_errors'] = true; } + $data['hash'] = md5(public_path('main.dart.js')); + return view('index.index', $data); } diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 97d214d595b0..e7db6b4bff98 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -51,7 +51,7 @@ class QueryLogging Log::info($request->method() . ' - ' . $request->url() . ": $count queries - " . $time); // if($count > 700) - // Log::info($queries); + // Log::info($queries); } } diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index e4cd473f4043..5184432fc7cd 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -5,7 +5,7 @@ Invoice Ninja - + @@ -75,7 +75,7 @@ - +