public function __construct($parent = NULL, $attributes = array(), $table = '', $exists = false) { if (!$parent || !is_a($parent, '\\Illuminate\\Database\\Eloquent\\Model')) { $parent = new Notification(); } if (empty($table)) { $table = $this->table; } parent::__construct($parent, $attributes, $table, $exists); }
/** * @param Model $parent * @param Model $third * @param array $attributes * @param string $table * @param boolean $exists */ public function __construct(Model $parent, Model $third, $attributes, $table, $exists = false) { parent::__construct($parent, $attributes, $table, $exists); $this->thirdKey = $third->getKeyName(); $this->third = $third; }