<div class="container-fluid">
<h1> Car Records </h1>

<table class = "table">
	<thead>
		<th> ID </th>	
		<th> Plate Number </th>
		<th> Brand </th>
		<th> Slot Number </th>
		<th> Created At </th>
		<th> Is Taken ?</th>
		<th> Delete</th>
	</thead>

	<tbody>
		<% @carlogs.each do |car| %> 
		<tr>
			<td><%=car.id %> </td>
			<td><%=car.plate_number %> </td>
			<td><%=car.brand%> </td>
			<td><%=car.slot_number%> </td>
			<td><%=car.created_at%> </td>
			<td><%= car.is_taken%> </td>
			<td><%= link_to "Delete", carlog_destroy_path(car.id), class: "btn btn-danger" %></td>

		</tr>
		<% end%>

	</tbody>
</table>

<%= link_to 'New Car', new_carlog_path, class: "btn btn-primary"%> 
</div>