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 namespace App\Models; | |
class Father extends Illuminate\Database\Eloquent\Model { | |
/** | |
* Get all children that call model their father. | |
* | |
* @return array | |
*/ | |
public function children() { | |
return $this | |
->hasMany('App\Models\Child', 'id', 'biological_father_id') |