Last active
June 18, 2016 02:02
-
-
Save prapats/a612f5e644d2e4e8e54b178403585b05 to your computer and use it in GitHub Desktop.
Revisions
-
Prapat Shantavasinkul renamed this gist
Jun 18, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Prapat Shantavasinkul created this gist
Jun 18, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ <?php class EducationDetail extends Model{ fatherEducationLevel{ return $this->belongsToOne('EducationLevel'); } motherEducationLevel{ return $this->belongsToOne('EducationLevel'); } sisterEducationLevel{ return $this->belongsToOne('EducationLevel'); } } class FatherEducationLevel extends Model{ public $table = 'education_levels'; // public function educationDetails(){ return $this->hasMany('EducationLevel'); } class MotherEducationLevel extends Model{ public $table = 'education_levels'; // public function educationDetails(){ return $this->hasMany('EducationLevel'); } class SisterEducationLevel extends Model{ public $table = 'education_levels'; // public function educationDetails(){ return $this->hasMany('EducationLevel'); }