File: /home/mmickelson/spilicensing/resources/views/purchaser/index.blade.php
@extends('layouts.master')
@section('content')
<h1>Purchaser <a href="{{ url('purchaser/create') }}" class="btn btn-primary pull-right btn-sm">Add New Purchaser</a></h1>
<div class="table">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>S.No</th><th>ContactName</th><th>ContactEmail</th><th>ContactPhone</th><th>Actions</th>
</tr>
</thead>
<tbody>
{{-- */$x=0;/* --}}
@foreach($purchaser as $item)
{{-- */$x++;/* --}}
<tr>
<td>{{ $x }}</td>
<td><a href="{{ url('purchaser', $item->id) }}">{{ $item->contactName }}</a></td><td>{{ $item->contactEmail }}</td><td>{{ $item->contactPhone }}</td>
<td>
<a href="{{ url('purchaser/' . $item->id . '/edit') }}">
<button type="submit" class="btn btn-primary btn-xs">Update</button>
</a> /
{!! Form::open([
'method'=>'DELETE',
'url' => ['purchaser', $item->id],
'style' => 'display:inline'
]) !!}
{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-xs']) !!}
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="pagination"> {!! $purchaser->render() !!} </div>
</div>
@endsection