Files
ficheagent/app/Models/TemplateServiceItem.php

32 lines
550 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TemplateServiceItem extends Model
{
protected $fillable = [
'template_id',
'service_id',
'label',
'is_mandatory',
'fields',
];
protected $casts = [
'is_mandatory' => 'boolean',
'fields' => 'array',
];
public function template()
{
return $this->belongsTo(IntegrationTemplate::class);
}
public function service()
{
return $this->belongsTo(Service::class);
}
}