Filippo Bertilotti
2024-09-10 d409fa3653032013d861de0870eead9e282d3136
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 Products extends Model
9 {
10
11     /**
12      * The attributes that are mass assignable.
13      *
14      * @var array<int, string>
15      */
16     protected $fillable = [
17         'LinkedMSISDN',
91fb11 18         'TmCode',
89a71b 19         'OMProductId',
91fb11 20         'Name',
D 21         'Description',
89a71b 22     ];
D 23
d86106 24     public function msisdn()
89a71b 25     {
b55a38 26         return $this->belongsToMany(Msisdn::class, 'pivot_msisdn_products', 'idProducts', 'idMsisdn');
89a71b 27     }
D 28
29 }