Primer commit
This commit is contained in:
19
app/Models/Subtask.php
Normal file
19
app/Models/Subtask.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Subtask extends Model
|
||||
{
|
||||
protected $fillable = ['task_id', 'title', 'completed'];
|
||||
|
||||
protected $casts = [
|
||||
'completed' => 'boolean',
|
||||
];
|
||||
|
||||
public function task()
|
||||
{
|
||||
return $this->belongsTo(Task::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user