When I want to retrieve translations for Slide model with a specific id, take 5 for example. This is the SQL statement that I observed:
$content = Slide::find(5)->content;
select *
from `slide_translations`
where `slide_translations`.`slide_id` = 5
and `slide_translations`.`slide_id` is not null
It appears that the later part ( slide_translations.slide_id is not null` ) is un-neccessary. I wonder if there is an option that I'm missing to ignore the second condition, or the package needs a small improvement. Thanks for reading.
I have a translatable model declared as below, nothing extra-ordinary: Slide.php
SlideTranslation.php
When I want to retrieve translations for Slide model with a specific id, take 5 for example. This is the SQL statement that I observed:
It appears that the later part (
slide_translations
.slide_id
is not null` ) is un-neccessary. I wonder if there is an option that I'm missing to ignore the second condition, or the package needs a small improvement. Thanks for reading.