Add phase_id to InspectionTemplate model
This commit is contained in:
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class InspectionTemplate extends Model
|
||||
{
|
||||
protected $fillable = ['name', 'description', 'project_id', 'fields'];
|
||||
protected $fillable = ['name', 'description', 'project_id', 'phase_id', 'fields'];
|
||||
|
||||
protected $casts = ['fields' => 'array'];
|
||||
|
||||
@@ -15,8 +15,13 @@ class InspectionTemplate extends Model
|
||||
return $this->belongsTo(Project::class);
|
||||
}
|
||||
|
||||
public function phase()
|
||||
{
|
||||
return $this->belongsTo(Phase::class);
|
||||
}
|
||||
|
||||
public function inspections()
|
||||
{
|
||||
return $this->hasMany(Inspection::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user