- 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>
34 lines
581 B
PHP
34 lines
581 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class RoadmapItem extends Model
|
|
{
|
|
protected $table = 'roadmap_items';
|
|
|
|
protected $fillable = [
|
|
'thema_id',
|
|
'titel',
|
|
'start',
|
|
'eind',
|
|
'type',
|
|
'status',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'start' => 'date',
|
|
'eind' => 'date',
|
|
];
|
|
}
|
|
|
|
public function thema(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Thema::class);
|
|
}
|
|
}
|