Skip to content

Commit

Permalink
Merge pull request #458 from kapuniko/patch-1
Browse files Browse the repository at this point in the history
Update query_tags.blade.php
  • Loading branch information
DissNik authored Apr 29, 2024
2 parents eebfdf1 + 62d5e3a commit cafb134
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions resources/views/pages/ru/resources/query_tags.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
['url' => '#icon', 'label' => 'Иконка'],
['url' => '#default', 'label' => 'Активный пункт'],
['url' => '#can-see', 'label' => 'Условие отображения'],
['url' => '#alias', 'label' => 'Алиас'],
]
]">

Expand Down Expand Up @@ -100,4 +101,22 @@ public function queryTags(): array // [tl! focus:start]
->canSee(fn() => auth()->user()->moonshine_user_role_id === 1) // [tl! focus]
</x-code>

<x-sub-title id="alias">Алиас</x-sub-title>

<x-p>
По умолчанию, значение для URL генерируется автоматически, из параметра Title.
В случае, когда Title задан не на английском, а на русском языке — он принудительно
транслитерируется: <code>'Заголовок фильтра' => 'zagolovok-filtra'</code>

Вы можете самостоятельно определить значение для URL, используя метод <code>alias()</code>
</x-p>

<x-code language="php">
QueryTag::make(
'Архив постов', // Заголовок тега
fn(Builder $query) => $query->where('is_archived', true)
)
->alias('archived-posts') // [tl! focus]
</x-code>

</x-page>

0 comments on commit cafb134

Please sign in to comment.