todo/app/Models/Note.php

28 lines
500 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Note extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'description',
'file',
'task_id',
'department_id',
'created_by_id',
];
public function task(): BelongsTo
{
return $this->belongsTo(Task::class);
}
}