From 3358cf8dea478a4062b9126b5854ec34c5ae65aa Mon Sep 17 00:00:00 2001 From: James Collins Date: Sat, 4 May 2024 14:21:35 +1000 Subject: [PATCH] fix default name --- resources/views/components/ui/filelist.blade.php | 4 ++++ resources/views/post/show.blade.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/components/ui/filelist.blade.php b/resources/views/components/ui/filelist.blade.php index ae56058..2c474ec 100644 --- a/resources/views/components/ui/filelist.blade.php +++ b/resources/views/components/ui/filelist.blade.php @@ -5,6 +5,10 @@ $onchange = $attributes->get('onchange'); $value = old($name, $value); $editor = filter_var($editor, FILTER_VALIDATE_BOOLEAN); + + if($name === '') { + $name = \Illuminate\Support\Str::random(8); + } @endphp @if($value !== '' || $editor === true) diff --git a/resources/views/post/show.blade.php b/resources/views/post/show.blade.php index ba79f25..ab1f89a 100644 --- a/resources/views/post/show.blade.php +++ b/resources/views/post/show.blade.php @@ -11,6 +11,6 @@
{!! $post->content !!}
- +