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/Msisdn.php | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Models/Msisdn.php b/app/Models/Msisdn.php index 5f3f0e8..fc57613 100644 --- a/app/Models/Msisdn.php +++ b/app/Models/Msisdn.php @@ -8,24 +8,31 @@ class Msisdn extends Model { + protected $table = "fakesso_msisdn"; + /** * The attributes that are mass assignable. * * @var array<int, string> */ protected $fillable = [ - 'VodafoneUser', 'MSISDN', 'CardType', 'IdPiano', 'VodafoneOne', 'TopClub', 'SeniorityCluster', + 'LinkedUser' ]; public function user() { - return $this->belongsTo('App\Models\VodafoneUser', 'VodafoneUser', 'id'); + return $this->belongsTo(VodafoneUser::class, 'LinkedUser'); + } + + public function products() + { + return $this->belongsToMany(Products::class, 'msisdn_has_products', 'idProducts', 'idMsisdn'); } } -- Gitblit v1.8.0