Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Fix #94 forgotten join clause
Browse files Browse the repository at this point in the history
  • Loading branch information
miyacorata committed May 29, 2020
1 parent d0d81ed commit 1801c16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Helpers/IdolHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ function translateHandedness($text){
function getIdolByBirthdate(string $date = null){
if($date) $date = date('2017-m-d',strtotime($date));
else $date = date('2017-m-d');
return \App\Idol::where('birthdate','=',$date)->get();
return \App\Idol::select('idols.*','c_k_names.id as cknameid','c_k_names.name_zh','c_k_names.name_ko',
'c_k_names.name_zh_separate','c_k_names.name_ko_separate',
'c_k_names.subname_zh','c_k_names.subname_ko')
->leftjoin('c_k_names','idols.id','=','c_k_names.idol_id')->where('birthdate','=',$date)->get();
}
}

0 comments on commit 1801c16

Please sign in to comment.