@extends('adminlte::layouts.app')

@section('htmlheader_title')
	{{ trans('adminlte_lang::message.home') }}
@endsection

@section('contentheader_title')
	<center>List Barang</center>
@endsection

@section('main-content')
<table class="table table-striped">
    <thead>
    	<tr>
            <th>Nama Barang</th>
            <th>Stock</th>
            <th>Harga</th>
            <th>Deskripsi</th>
            <th>Kategori</th>
            <th>Gambar</th>
        	<th>Action</th>
        </tr>
    </thead>
                            
        <tbody>
            @foreach($barangs as $barang)
	            <tr>
	                <td>{{$barang->nama}}</td>
	                <td>{{$barang->jumlah}}</td>
	                <td>{{$barang->harga}}</td>
	                <td>{{$barang->deskripsi}}</td>
	                <td>{{$barang->kategori}}</td>
	                <td>{{$barang->gambar}}</td>
	                <td>
						<a href="{{ url('/edit', $barang->id) }}" type="submit" button type="button" class="btn btn-warning">Edit</a>
						<a href="{{ url('/delete', $barang->id) }}" class="btn btn-warning">Delete</a>
						<!-- <a href="{{ url('/delete', $barang->id) }}"  <onclick="return confirm('Yakin mau hapus data ini sob?')" class="btn btn-warning">Delete</a> -->
	            	</tr>
    		@endforeach
    </tbody>
</table>
<a href="{{ url('/create') }}" button type="button" class="btn btn-info">Create</a></button>
@endsection
