first commit
This commit is contained in:
57
resources/views/product/index.blade.php
Normal file
57
resources/views/product/index.blade.php
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Products</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" >
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-2">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 margin-tb">
|
||||
<div class="pull-left">
|
||||
<h2>Products</h2>
|
||||
</div>
|
||||
<div class="pull-right mb-2">
|
||||
<a class="btn btn-success" href="{{ route('products.create') }}"> Create Product</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Article</th>
|
||||
<th>Name</th>
|
||||
<th>price</th>
|
||||
<th>quantity</th>
|
||||
<th width="280px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($products as $product)
|
||||
<tr>
|
||||
<td>{{ $product->article }}</td>
|
||||
<td>{{ $product->name }}</td>
|
||||
<td>{{ $product->price }}</td>
|
||||
<td>{{ $product->quantity }}</td>
|
||||
<td>
|
||||
<form action="{{ route('products.destroy',$product->id) }}" method="Post">
|
||||
<a class="btn btn-primary" href="{{ route('products.edit',$product->id) }}">Edit</a>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{!! $products->links() !!}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user