Answer the question
In order to leave comments, you need to log in
theorchid image loader?
I can't figure out how to set the thumbanial field for posts. Well, in fact, the button to download the picture. There is UploadPostForm::class but it is essentially more for the gallery.
Tried like this
'thumb' => 'tag:input|type:file|name:thumb|title:Изображение поста',
htmlspecialchars() expects parameter 1 to be string, array given (View: /var/www/portal/vendor/orchid/platform/resources/views/fields/input.blade.php) (View: /var/www/portal/vendor/orchid/platform/resources/views/fields/input.blade.php)
Answer the question
In order to leave comments, you need to log in
Use the standard uploader, you can upload multiple images and sort them (Drag and Drop)
And make the first image the main one and display it.
//low - разрешение которое необходимо, регистрируется в файле конфигурации
$post->attachment->first()->url('low');
//Если содержится не только изображения, но и файлы для загрузки
//можно уточнить, что выбирать нужно, только из изображений
$post->attachment('image')->first()->url('low');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question