diff --git a/app/Models/ServerLog.php b/app/Models/ServerLog.php index b9b339f..e308ee4 100755 --- a/app/Models/ServerLog.php +++ b/app/Models/ServerLog.php @@ -132,10 +132,12 @@ public function getContent($lines = null): ?string return tail(Storage::disk($this->disk)->path($this->name), $lines); } - return Storage::disk($this->disk)->get($this->name); + $content = Storage::disk($this->disk)->get($this->name); + + return $content ?? 'Empty log file!'; } - return ''; + return "Log file doesn't exist!"; } public static function log(Server $server, string $type, string $content, ?Site $site = null): static