mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Make hasOne / hasOneThrough and morphOne nullable. (#864)
This commit is contained in:
@@ -26,6 +26,11 @@ class Simple extends Model
|
||||
return $this->hasOne(Simple::class);
|
||||
}
|
||||
|
||||
public function relationHasOneWithDefault(): HasOne
|
||||
{
|
||||
return $this->hasOne(Simple::class)->withDefault();
|
||||
}
|
||||
|
||||
public function relationBelongsTo(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Simple::class);
|
||||
|
||||
Reference in New Issue
Block a user