mirror of
https://github.com/10h30/MoveMate.git
synced 2026-07-11 18:56:06 +09:00
23 lines
449 B
PHP
23 lines
449 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Task extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $attributes = [
|
|
'completed' => false, // Set default value for completed
|
|
];
|
|
|
|
public function user() {
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
public function category() {
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
}
|