diff --git a/app/Models/Message.php b/app/Models/Message.php index 6102b01..39bbd9c 100644 --- a/app/Models/Message.php +++ b/app/Models/Message.php @@ -45,10 +45,11 @@ public function size(): Attribute { // NOTE: Number::fileSize doesn't work since NativePHP is missing the 'intl' extension return Attribute::make( - get: function() { + get: function () { $base = log(strlen($this->content)) / log(1024); - $suffix = array("", "KB", "MB", "GB", "TB"); + $suffix = ['', 'KB', 'MB', 'GB', 'TB']; $floor = floor($base); + return round(pow(1024, $base - $floor), 1) . $suffix[$floor]; } )->shouldCache(); diff --git a/resources/views/components/input/button.blade.php b/resources/views/components/input/button.blade.php index c47cd69..4248ad8 100644 --- a/resources/views/components/input/button.blade.php +++ b/resources/views/components/input/button.blade.php @@ -21,6 +21,4 @@ 'type' => $type, 'href' => $href, 'class' => "{$defaultClasses} {$levelClasses}", -]) }}> - {{ $slot }} - +]) }}>{{ $slot }} diff --git a/resources/views/components/support/title-spacer.php b/resources/views/components/support/title-spacer.blade.php similarity index 100% rename from resources/views/components/support/title-spacer.php rename to resources/views/components/support/title-spacer.blade.php