mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Implement new config to specify return type of custom relations (#1300)
* Implement new config to specify return type of custom relations * Apply suggestions from code review Co-authored-by: Markus Podar <[email protected]> * add test for morphed * fix test output * add info about how to add custom relationships * fix wording Co-authored-by: Markus Podar <[email protected]>
This commit is contained in:
@@ -94,6 +94,9 @@ use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
* @property-read int|null $relation_morphed_by_many_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|Simple[] $relationSampleRelationType
|
||||
* @property-read int|null $relation_sample_relation_type_count
|
||||
* @property-read Model|\Eloquent $relationSampleToAnyMorphedRelationType
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|Simple[] $relationSampleToAnyRelationType
|
||||
* @property-read int|null $relation_sample_to_any_relation_type_count
|
||||
* @property-read Simple $relationSampleToManyRelationType
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||
@@ -182,4 +185,14 @@ class Simple extends Model
|
||||
{
|
||||
return $this->testToManyRelation(Simple::class);
|
||||
}
|
||||
|
||||
public function relationSampleToAnyRelationType()
|
||||
{
|
||||
return $this->testToAnyRelation(Simple::class);
|
||||
}
|
||||
|
||||
public function relationSampleToAnyMorphedRelationType()
|
||||
{
|
||||
return $this->testToAnyMorphedRelation(Simple::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user