mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
* phpcs: enable also for config, resources and tests
* composer fix-style
* vendor/bin/phpunit -d --update-snapshots
* gha: instead of checking the style, fix and auto-commit it 💪
23 lines
570 B
PHP
23 lines
570 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomCollection\Models;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomCollection\Collections\SimpleCollection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Simple extends Model
|
|
{
|
|
public function newCollection(array $models = [])
|
|
{
|
|
return new SimpleCollection($models);
|
|
}
|
|
|
|
public function relationHasMany(): HasMany
|
|
{
|
|
return $this->hasMany(Simple::class);
|
|
}
|
|
}
|