Filippo Bertilotti
2024-09-10 13f6a9f0f63796e7b9767ccd83f1c3a17d496b0c
app/Models/Msisdn.php
@@ -8,29 +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->hasMany('App\Models\Products','LinkedMSISDN', 'id');
        return $this->belongsToMany(Products::class, 'pivot_msisdn_products', 'idProducts', 'idMsisdn');
    }
}