keep gallery order
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
<x-ui.gallery
|
<x-ui.gallery
|
||||||
label="Gallery"
|
label="Gallery"
|
||||||
name="gallery"
|
name="gallery"
|
||||||
value="{{ isset($post) ? \App\Helpers::arrayToString($post->files('gallery')->pluck('name')->toArray()) : '' }}"
|
value="{{ isset($post) ? \App\Helpers::arrayToString($post->files('gallery')->orderBy('mediables.created_at')->pluck('name')->toArray()) : '' }}"
|
||||||
editor="true"
|
editor="true"
|
||||||
></x-ui.gallery>
|
></x-ui.gallery>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<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')->orderBy('mediables.created_at')->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" label="Files" value="{!! $post->files()->orderBy('name')->get() !!}" />
|
<x-ui.filelist class="mt-16" label="Files" value="{!! $post->files()->orderBy('name')->get() !!}" />
|
||||||
</x-container>
|
</x-container>
|
||||||
|
|||||||
Reference in New Issue
Block a user