* @mixin \Illuminate\Database\Eloquent\Builder */ abstract class HasOneOrMany extends Relation { /** * Create a new has one or many relationship instance. * * @param \Illuminate\Database\Eloquent\Builder $query * @param \Illuminate\Database\Eloquent\Model $parent * @param string $foreignKey * @param string $localKey * @return void */ public function __construct(Builder $query, Model $parent, $foreignKey, $localKey) { $this->localKey = $localKey; $this->foreignKey = $foreignKey; parent::__construct($query, $parent); } /** * @param array $attributes * @return \Illuminate\Database\Eloquent\Model * @psalm-return TRelatedModel */ public function make(array $attributes = []) { } /** * @param mixed $id * @param array $columns * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model * @psalm-return TRelatedModel */ public function findOrNew($id, $columns = ['*']) { } /** * @param array $attributes * @param array $values * @return \Illuminate\Database\Eloquent\Model * @psalm-return TRelatedModel */ public function updateOrCreate(array $attributes, array $values = []) { } /** * @param array $attributes * @return \Illuminate\Database\Eloquent\Model * @psalm-return TRelatedModel */ public function create(array $attributes = []) { } /** * @param array $records * @return \Illuminate\Database\Eloquent\Collection * @psalm-return \Illuminate\Database\Eloquent\Collection */ public function createMany(array $records) { } }