@extends('layouts.app')

@section('content')
	<div class="container ">
		<div class="row mt-5 pt-1 justify-content-center">
			<div class="col-md-8 col-offset-md-4">
				<div class="card card-primary">
					<div class="card-header"><a href="{!! route('backend.categories.form.add') !!}"><i class="fa fda-plus"></i></a>Listado de Categorias</div>

					<div class="card-body ">
						<table class="table table-categories table-striped table-conde table-hover ">
							<thead class="table-primary">
								<tr>
									<th>Acci&oacute;n</th>
									<th>#</th>
									<th>Categoria</th>
                  <th>Creado</th>
                  <th>Actualiado</th>
								</tr>
							</thead>
							<tbody>
								@foreach ($data as $node)
									<tr>
										<td>
											<a class="btn btn-info " data-cid="{!! $node->id !!}" href="{!! route('backend.categories.form.edit', ['cat' => $node->id]) !!}"> <i
													class="fa fa-pencil"></i></a><a class="btn btn-danger" data-cid="{!! $node->id !!}" href="#"> <i
													class="fa fa-trash"></i></a>
										</td>
										<td>
											{!! $node->id !!}
										</td>
										<td>
											{!! $node->name !!}
										</td>
                    <td>
											{!! $node->created_at !!}
										</td>
                    <td>
											{!! $node->updated_at !!}
										</td>
									</tr>
								@endforeach
							</tbody>

						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
@endsection
@section('scripts')
	$('.table-categories').DataTable({
	responsive: true,
	language:{
	url: '{!! asset('js/datatables.es.json') !!}'
	}
	});
@endsection
