- Add explicit $table property to all Eloquent models with Dutch names - Fix pivot table names in belongsToMany relationships - Fix seeder: use valid enum values for afhankelijkheden status Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
605 B
PHP
30 lines
605 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Afhankelijkheid extends Model
|
|
{
|
|
protected $table = 'afhankelijkheden';
|
|
|
|
protected $fillable = [
|
|
'project_id',
|
|
'afhankelijk_van_project_id',
|
|
'type',
|
|
'beschrijving',
|
|
'status',
|
|
];
|
|
|
|
public function project(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function afhankelijkVan(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Project::class, 'afhankelijk_van_project_id');
|
|
}
|
|
}
|