Exemple #1
0
					<th>Item</th>
					<th>Units</th>
					<th>Quantity</th>
					<th>Selling Price per Unit</th>
					<th>Subtotal</th>
				</tr>
			</thead>
			<tbody>
				@foreach ($items as $item)
				<tr>
					<td><?php 
echo Item::withTrashed()->find($item->item_id)->name;
?>
</td>
					<td><?php 
echo Item::withTrashed()->find($item->item_id)->unit;
?>
</td>
					<td>{{ $item->quantity }}</td>
					<td>Php {{ number_format($item->unit_price, 2, '.', ',') }}</td>
					<td>Php {{ number_format($item->total_price, 2, '.', ',') }}</td>
				</tr>
				@endforeach
			</tbody> 
			</table>
		</div>
		<br><br>
		<div class="panel panel-default">
		<div class="panel-heading"><strong>Controls</strong></div>
		<div class="panel-body">
		<table class="button-tables">
 public function destroyAll()
 {
     Item::withTrashed()->where('user_id', \Auth::user()->id)->forceDelete();
     \Session::flash('flash_message', "All items have been permanently deleted");
     return redirect('items');
 }