From 0eae7a15216040812e567d5178fec25612195b02 Mon Sep 17 00:00:00 2001
From: Filippo Bertilotti <filippobertilotti@gmail.com>
Date: Fri, 20 Sep 2024 10:49:23 +0200
Subject: [PATCH] fix nome tabelle

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

diff --git a/app/Models/Products.php b/app/Models/Products.php
index 88470c8..f477738 100644
--- a/app/Models/Products.php
+++ b/app/Models/Products.php
@@ -7,7 +7,7 @@
 
 class Products extends Model
 {
-
+    protected $table = "fakesso_products";
     /**
      * The attributes that are mass assignable.
      *
@@ -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, 'msisdn_has_products', 'idProducts', 'idMsisdn');
     }
 
 }

--
Gitblit v1.8.0