mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
* option to use generics syntax, default to yes in laravel 9 * rename `use_generics_syntax` to `use_generics_annotations` * update readme and changelog * remove laravel 9 default override * include key type in generics annotations * readme rewording * set `use_generics_annotations` to `true` by default * update tests to reflect `use_generics_annotations` being set to `true` by default * default `use_generics_annotations` setting to true when not set in config Co-authored-by: Markus Podar <[email protected]> --------- Co-authored-by: Markus Podar <[email protected]>
24 lines
563 B
PHP
24 lines
563 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenericsSyntaxDisabled\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Simple extends Model
|
|
{
|
|
// Regular relations
|
|
public function regularHasMany(): HasMany
|
|
{
|
|
return $this->hasMany(Simple::class);
|
|
}
|
|
|
|
public function regularBelongsToMany(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(Simple::class);
|
|
}
|
|
}
|