Open ahmetsmc opened 1 year ago
9.22
8.1.4
1.6.x-dev
5.7.42
I have translatable Post model and table and i have 2 locale(de, en).
I am using for translate:
$post = Post::whereTranslation("slug", $slug)->firstOrFail()->translate();
This gives the correct result but my problem is i dont want alternative locale. So, locale is de then just tranlsate for de.
de
I tried this but not working:
$page = Page::whereTranslation('slug', '=', $slug, [app()->getLocale()], false)->firstOrFail()->translate();
When I try this way, it always returns 404. Where is the problem, does anyone have any ideas or is this a problem?
.
No response
Laravel version
9.22
PHP version
8.1.4
Voyager version
1.6.x-dev
Database
5.7.42
Description
I have translatable Post model and table and i have 2 locale(de, en).
I am using for translate:
This gives the correct result but my problem is i dont want alternative locale. So, locale is
de
then just tranlsate forde
.I tried this but not working:
When I try this way, it always returns 404. Where is the problem, does anyone have any ideas or is this a problem?
Steps to reproduce
.
Expected behavior
.
Screenshots
No response
Additional context
No response