todo/app/Models/Note.php

28 lines
500 B
PHP
Raw Permalink Normal View History

2024-04-27 15:14:55 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
2024-05-29 16:20:22 +03:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2024-04-27 15:14:55 +03:00
class Note extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'description',
'file',
'task_id',
'department_id',
'created_by_id',
];
2024-05-29 16:20:22 +03:00
public function task(): BelongsTo
{
return $this->belongsTo(Task::class);
}
2024-04-27 15:14:55 +03:00
}