From 2bfce618a9d3b4cd86be2acd551a56aa45800efd Mon Sep 17 00:00:00 2001
From: Filippo Bertilotti <filippobertilotti@gmail.com>
Date: Fri, 26 Jul 2024 10:49:09 +0200
Subject: [PATCH] utilizzo del model per insrimento dati database

---
 app/Models/Products.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/Models/Products.php b/app/Models/Products.php
index 88470c8..21336a7 100644
--- a/app/Models/Products.php
+++ b/app/Models/Products.php
@@ -15,15 +15,15 @@
      */
     protected $fillable = [
         'LinkedMSISDN',
-        'tmCode',
+        'TmCode',
         'OMProductId',
-        'description',
-        'activationDate'
+        'Name',
+        'Description',
     ];
 
-    public function user()
+    public function msisdn()
     {
-        return $this->belongsTo('App\Models\Msisdn', 'LinkedMSISDN', 'id');
+        return $this->belongsToMany(Msisdn::class, 'pivot_msisdn_products', 'idProducts', 'idMsisdn');
     }
 
 }

--
Gitblit v1.8.0