psalm-plugin-laravel/tests/Models/Video.php
2022-02-10 17:45:51 +01:00

21 lines
420 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphMany;
final class Video extends Model
{
/**
* Get all of the video's comments.
* @psalm-return MorphMany<Comment>
*/
public function comments(): MorphMany
{
return $this->morphMany(Comment::class, 'commentable');
}
}