todo/app/Models/Label.php

25 lines
453 B
PHP
Raw Normal View History

2024-04-27 15:06:00 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
2024-05-29 16:18:46 +03:00
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
2024-04-27 15:06:00 +03:00
2024-05-02 09:13:05 +03:00
class Label extends Model
2024-04-27 15:06:00 +03:00
{
use HasFactory;
protected $fillable = [
'id',
'name',
2024-05-30 16:52:51 +03:00
'project_id',
'created_by_id',
];
2024-05-29 16:18:46 +03:00
public function tasks(): BelongsToMany
{
return $this->belongsToMany(Task::class);
}
2024-04-27 15:06:00 +03:00
}