feature/columna-totales #4

Open
atasistro wants to merge 46 commits from feature/columna-totales into master
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 382b973227 - Show all commits

View file

@ -29,6 +29,6 @@ class Pedido extends Model
*/
public function productos(): BelongsToMany
{
return $this->belongsToMany(Producto::class);
return $this->belongsToMany(Producto::class)->withPivot(['cantidad','total']);
}
}

View file

@ -29,7 +29,7 @@ class Producto extends Model
*/
public function pedidos(): BelongsToMany
{
return $this->belongsToMany(Pedido::class);
return $this->belongsToMany(Pedido::class)->withPivot(['cantidad','total']);
}
/**