belongsToMany(Playlist::class, 'playlist_track', 'TrackId', 'PlaylistId'); } protected $fillable = ['TrackId', 'Name', 'AlbumId', 'MediaTypeId', 'GenreId', 'Composer', 'Milliseconds', 'Bytes', 'UnitPrice']; protected $table = 'tracks'; //Si la tabla no es la esperada, definimos la variable $table con el nombre correspondiente. protected $primaryKey = 'TrackId'; // Si la PK es distinta a id, definimos la variable $primaryKey con el nombre correcto. public $incrementing = true; //true o false segĂșn si es o no autoincrementable la columna. Si se hace por trigger, definir // en false. //protected $keyType = 'string'; Si el tipo no es entero, definimos la variable $keyType public $timestamps = false; }