@extends('layouts.app') @section('title', trans('product.list')) @section('content')

{{ trans('product.list') }}

{{ Form::open(['method' => 'get','class' => 'form-inline']) }} {!! FormField::text('q', ['value' => request('q'), 'label' => trans('product.search'), 'class' => 'input-sm']) !!} {{ Form::submit(trans('product.search'), ['class' => 'btn btn-sm']) }} {{ link_to_route('products.index', trans('app.reset')) }} {{ Form::close() }}
@foreach($products as $key => $product) @endforeach
{{ trans('app.table_no') }} {{ trans('product.name') }} {{ trans('product.unit') }} {{ trans('product.cash_price') }} {{ trans('product.credit_price') }} {{ trans('app.action') }}
{{ $products->firstItem() + $key }} {{ $product->name }} {{ $product->unit->name }} {{ formatRp($product->cash_price) }} {{ formatRp($product->credit_price) }} {!! link_to_route('products.index', trans('app.edit'), ['action' => 'edit', 'id' => $product->id] + Request::only('q'), ['id' => 'edit-product-' . $product->id]) !!} | {!! link_to_route('products.index', trans('app.delete'), ['action' => 'delete', 'id' => $product->id] + Request::only('q'), ['id' => 'del-product-' . $product->id]) !!}
@include('products.partials.forms')
@endsection