Last active
June 18, 2016 02:02
-
-
Save prapats/a612f5e644d2e4e8e54b178403585b05 to your computer and use it in GitHub Desktop.
This file contains 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 characters
<?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'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment