32 lines
648 B
PHP
32 lines
648 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\CarbonInterface;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $content
|
|
* @property CarbonInterface $created_at
|
|
* @property CarbonInterface $updated_at
|
|
*/
|
|
class Comment extends Model
|
|
{
|
|
/** @use HasFactory<\Database\Factories\CommentFactory> */
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['content'];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo<Model, $this>
|
|
*/
|
|
public function commentable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
}
|