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', 'name', 'description', 'Name', 'Description', ]; public function msisdn() { return $this->belongsTo('App\Models\Msisdn', 'LinkedMSISDN', 'id'); return $this->belongsToMany(Msisdn::class, 'msisdn_has_products', 'idProducts', 'idMsisdn'); } }