fix default name
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
$onchange = $attributes->get('onchange');
|
$onchange = $attributes->get('onchange');
|
||||||
$value = old($name, $value);
|
$value = old($name, $value);
|
||||||
$editor = filter_var($editor, FILTER_VALIDATE_BOOLEAN);
|
$editor = filter_var($editor, FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
||||||
|
if($name === '') {
|
||||||
|
$name = \Illuminate\Support\Str::random(8);
|
||||||
|
}
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if($value !== '' || $editor === true)
|
@if($value !== '' || $editor === true)
|
||||||
|
|||||||
@@ -11,6 +11,6 @@
|
|||||||
<article class="content mb-4">{!! $post->content !!}</article>
|
<article class="content mb-4">{!! $post->content !!}</article>
|
||||||
<x-ui.gallery class="mt-16" value="{{ \App\Helpers::arrayToString($post->files('gallery')->pluck('name')->toArray()) }}" />
|
<x-ui.gallery class="mt-16" value="{{ \App\Helpers::arrayToString($post->files('gallery')->pluck('name')->toArray()) }}" />
|
||||||
<x-ui.filelist class="mt-16" label="Videos" value="{!! $post->files('videos')->orderBy('name')->get() !!}" />
|
<x-ui.filelist class="mt-16" label="Videos" value="{!! $post->files('videos')->orderBy('name')->get() !!}" />
|
||||||
<x-ui.filelist class="mt-16" value="{!! $post->files()->orderBy('name')->get() !!}" />
|
<x-ui.filelist class="mt-16" label="Files" value="{!! $post->files()->orderBy('name')->get() !!}" />
|
||||||
</x-container>
|
</x-container>
|
||||||
</x-layout>
|
</x-layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user