<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class ProjectMember extends Model { protected $fillable=['project_id','user_id','role','allocation_percent','billable','start_date','end_date','responsibilities','access_level']; protected function casts():array{return ['billable'=>'boolean','start_date'=>'date','end_date'=>'date'];} public function project(){return $this->belongsTo(Project::class);} public function user(){return $this->belongsTo(User::class);} }