Filippo Bertilotti
2024-07-15 488dbe0a4f0d5be738a5ac010d19a94ce45f20a2
commit | author | age
89a71b 1 <?php
D 2
3 namespace App\Models;
4
5 use Illuminate\Database\Eloquent\Model;
6 use Illuminate\Database\Eloquent\SoftDeletes;
7
8 class Msisdn extends Model
9 {
10
11     /**
12      * The attributes that are mass assignable.
13      *
14      * @var array<int, string>
15      */
16     protected $fillable = [
17         'VodafoneUser',
18         'MSISDN',
19         'CardType',
20         'IdPiano',
21         'VodafoneOne',
22         'TopClub',
23         'SeniorityCluster',
24     ];
25
26     public function user()
27     {
28         return $this->belongsTo('App\Models\VodafoneUser', 'VodafoneUser', 'id');
29     }
30
2f9a34 31     public function products()
D 32     {
b55a38 33         return $this->belongsToMany('App\Models\Products', 'pivot_msisdn_products', 'idProducts', 'idMsisdn');
2f9a34 34     }
D 35
89a71b 36 }