@extends('layout.master') @section('content') @include('layout.errorform') @include('layout.info')
Add Product
{!! Form::open(['route' => 'product.store', 'class' => 'form-horizontal', 'id' => 'form', 'files' => true]) !!}
{!! Form::label('pr', 'Product :', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::text('product', @$value, ['class' => 'form-control', 'placeholder' => 'Product', 'id' => 'pr']) !!}
{!! Form::label('co', 'Price :', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::text('retail', @$value, ['class' => 'form-control', 'placeholder' => 'Price in Rs.', 'id' => 'co']) !!}
@if(auth()->user()->id_group == 1) @else {!! Form::hidden('commission', 0) !!} @endif
{!! Form::label('cat', 'Category :', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::select('id_category', $r, NULL, ['class' => 'form-control', 'placeholder' => 'Choose Category', 'id' => 'cat']) !!}
{!! Form::label('img', 'Image :', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::file('image[]', ['id' => 'img', 'multiple' => 'multiple','class'=>'form-control',]) !!}
@if(auth()->user()->id_group == 1)
@else {!! Form::hidden('active', 0) !!} @endif
{!! Form::open(['route' => 'sales.index', 'method' => 'POST']) !!} {!! Form::submit('Save', ['class' => 'btn btn-primary btn-lg btn-block']) !!} {!! Form::close() !!}
{!! Form::close() !!}
Product List
@if( count($pro) > 0 ) @foreach ($pro as $k)
product category retail active image action
{!! $k->product !!} {!! App\ProductCategory::find($k->id_category)->product_category !!} RS. {!! number_format($k->retail, 2) !!} {!! ($k->active == 1) ? 'active' : 'inactive' !!}