# Helper methods

Voyager имеет несколько вспомогательных функций, готовых к использованию. Здесь вы можете найти список доступных функций, которые могут ускорить вашу разработку.

## Thumbnails URL

Voyager будет генерировать эскизы для типа поля изображения, когда вы укажете [дополнительные опции поля](/voyager-ru/bread/introduction.md#additional-field-options).

После того, как вы сгенерировали эскизы, вы можете захотеть отобразить их на экране или получить URL эскиза. Для того, чтобы сделать это, вам нужно добавить трейт `Resizable` к вашей модели.

```php
use TCG\Voyager\Traits\Resizable;

class Post extends Model
{
    use Resizable;
}
```

### Отобразить одно изображение

```php
@foreach($posts as $post)
    <img src="{{Voyager::image($post->thumbnail('small'))}}" />
@endforeach
```

Или вы можете указать необязательное имя поля изображения (attribute), по умолчанию `image`.

```php
@foreach($posts as $post)
    <img src="{{Voyager::image($post->thumbnail('small', 'photo'))}}" />
@endforeach
```

### Отобразить несколько изображений

```php
@foreach($posts as $post)
    $images = json_decode($post->images);
    @foreach($images as $image)
        <img src="{{ Voyager::image($post->getThumbnail($image, 'small')) }}" />
    @endforeach
@endforeach
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://delphinpro.gitbook.io/voyager-ru/core-concepts/helper-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
