Lae/app/Models/Task.php

33 lines
565 B
PHP
Raw Normal View History

2022-08-13 08:37:17 +00:00
<?php
2022-11-06 11:28:22 +00:00
namespace App\Models;
2022-08-13 08:37:17 +00:00
2022-11-06 11:28:22 +00:00
use Illuminate\Database\Eloquent\Model;
2022-11-20 14:35:53 +00:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2022-08-13 08:37:17 +00:00
class Task extends Model
{
public $incrementing = false;
2023-01-30 16:14:07 +00:00
2022-08-26 14:37:20 +00:00
protected $fillable = [
'host_id',
2023-02-08 05:14:15 +00:00
'user_id',
2022-08-26 14:37:20 +00:00
'title',
'progress',
'status',
];
2023-01-30 16:14:07 +00:00
2022-08-26 14:37:20 +00:00
protected $casts = [
'id' => 'string',
'progress' => 'integer',
];
2022-09-08 18:35:00 +00:00
// key type string
protected $keyType = 'string';
2022-11-20 14:35:53 +00:00
public function host(): BelongsTo
{
return $this->belongsTo(Host::class);
}
2022-08-13 08:37:17 +00:00
}