Initial commit of testapi

This commit is contained in:
2025-06-20 13:33:07 +02:00
commit a455aba1d5
377 changed files with 30566 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Department extends Model
{
use HasFactory;
protected $fillable = [
'name',
];
/**
* The projects that belong to the department.
*/
public function projects(): BelongsToMany {
return $this->belongsToMany(
Project::class,
'department_project',
'department_id',
'project_id'
);
}
}