Hello, I am using this package on my multilingual blog, where I translate some posts and some not,
for now when user opens my blog, he can see all posts, no matter if they are translated or not.
if he is using the locale that the post is not translated in, it's still showing the post, but without title and content. how can I hide them? so in this case I can post in different languages, so if I want to publish a post in all languages, I just translate it.
my controller:
public function blog()
{
$blogs = Blogs::where('status', 'published')->orderBy('id','desc')->paginate(10);
$page = request()->get('page');
if ($page > $blogs->lastPage()) {
abort('404');
}
return view('index.blog', ['blogs' => $blogs]);
}
I also used Scopes, but I don't know if I did it right or not.
Hello, I am using this package on my multilingual blog, where I translate some posts and some not, for now when user opens my blog, he can see all posts, no matter if they are translated or not. if he is using the locale that the post is not translated in, it's still showing the post, but without title and content. how can I hide them? so in this case I can post in different languages, so if I want to publish a post in all languages, I just translate it.
my controller:
I also used Scopes, but I don't know if I did it right or not.
Thanks.