Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 6, 2020 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7315d923479b03a064fcce14517c32f6 to your computer and use it in GitHub Desktop.
Save parzibyte/7315d923479b03a064fcce14517c32f6 to your computer and use it in GitHub Desktop.
@extends("maestra")
@section("titulo", "Productos")
@section("contenido")
<div class="row">
<div class="col-12">
<h1>Productos <i class="fa fa-box"></i></h1>
<a href="{{route("productos.create")}}" class="btn btn-success mb-2">Agregar</a>
@include("notificacion")
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Código de barras</th>
<th>Descripción</th>
<th>Precio de compra</th>
<th>Precio de venta</th>
<th>Utilidad</th>
<th>Existencia</th>
<th>Editar</th>
<th>Eliminar</th>
</tr>
</thead>
<tbody>
@foreach($productos as $producto)
<tr>
<td>{{$producto->codigo_barras}}</td>
<td>{{$producto->descripcion}}</td>
<td>{{$producto->precio_compra}}</td>
<td>{{$producto->precio_venta}}</td>
<td>{{$producto->precio_venta - $producto->precio_compra}}</td>
<td>{{$producto->existencia}}</td>
<td>
<a class="btn btn-warning" href="{{route("productos.edit",[$producto])}}">
<i class="fa fa-edit"></i>
</a>
</td>
<td>
<form action="{{route("productos.destroy", [$producto])}}" method="post">
@method("delete")
@csrf
<button type="submit" class="btn btn-danger">
<i class="fa fa-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment