todos angelegt

This commit is contained in:
DigitalInfinity committed 2026-06-02 18:05:04 +00:00
1 parent 19a62578fb
commit cf2c953fab
9 files changed
+271

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Override;
#[Fillable('name', 'content', 'user_id', 'todoable_type', 'todoable_id', 'due_date', 'done_date', 'follow_up', 'review')]
class Todo extends Model
{
public function todoable(): MorphTo
{
return $this->morphTo();
}
public function user(): BelongsTo {
return $this->belongsTo(User::class);
}
}