/** * @param string $type * * @return \Illuminate\Database\Eloquent\Model */ public function newInstance($type = null) { if (is_null($type)) { return $this->model->newInstance(); } return $this->{$type}->newInstance(); }
/** * @param string $type * * @return \Illuminate\Database\Eloquent\Model */ public function newInstance($type = null) { if (is_null($type)) { return $this->model->newInstance(); } return $this->{$type}->newInstance(); }