<div class="tab-content"> <div class="active tab-pane" id="activity"> <table class="table table-striped"> <thead> <tr> <th>ID</th> <th>Tanggal Order</th> <th>Nominal</th> <th>Actions</th> </tr> </thead> <tbody> @foreach($penjualan as $pj) <?php $detail = Penjualan::find($pj->id)->DetailPenjualan; ?> <tr> <td>{{ link_to_route('admin.penjualan.show', $pj->id, $pj->id) }}</td> <td>{{ date('d F, Y', strtotime($pj->tgl_order)) }}</td> <td>{{ $pj->nominal }}</td> <td> {{ Form::open(array('route' => array('admin.penjualan.destroy', $pj->id), 'method' => 'delete','class'=>'delete')) }} {{Form::button('<i class="fa fa-trash-o"></i>', array('type' => 'submit', 'class' => 'btn btn-danger'))}} {{ Form::close() }} </td> </tr> @endforeach </tbody> </table>
public function printout($id) { $customer = Penjualan::find($id)->customer; $penjualan = Penjualan::find($id); $detail = DetailPenjualan::where('penjualan_id', '=', $id)->get(); return View::make('admin.penjualans.printout', compact('penjualan', 'customer', 'detail')); }