'int', 'template_id' => 'int', 'in_pdf' => 'bool', 'type_id' => 'int', 'view_position' => 'int' ]; protected $dates = [ 'begin', 'end' ]; protected $fillable = [ 'lead_id', 'template_id', 'in_pdf', 'begin', 'end', 'type_id', 'type_s', 'data_s', 'view_position' ]; public function lead() { return $this->belongsTo(Lead::class); } public function inquiry_template() { return $this->belongsTo(InquiryTemplate::class, 'template_id'); } public function inquiry_type() { return $this->belongsTo(InquiryType::class, 'type_id'); } }