From 4acdd8df12cd0765782e763d227de2d5d5d3a4c8 Mon Sep 17 00:00:00 2001 From: Thijmen Stavenuiter Date: Sat, 22 Jun 2024 10:30:40 +0200 Subject: [PATCH] Add null check --- resources/views/layouts/base.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index adaab3eb5..9ada393db 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -19,7 +19,11 @@ @php $instanceSettings = InstanceSettings::first(); - $name = strlen($instanceSettings->instance_name) > 0 ? "[{$instanceSettings->instance_name}] " : ''; + $name = null; + + if($instanceSettings) { + $name = strlen($instanceSettings->instance_name) > 0 ? "[{$instanceSettings->instance_name}] " : ''; + } @endphp {{ $name }}{{ $title ?? 'Coolify' }} @env('local')