File: /home/mmickelson/spilicensing/resources/views/license/index.blade.php
@extends('layouts.master')
@section('content')
<h1>Licenses <a href="{{ url('license/create') }}" class="btn btn-primary pull-right btn-sm">Create New Licenses</a></h1>
<div class="table">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>ID</th>
<th>Activations</th>
<th>Product</th>
<th>Subproduct</th>
<th>Type</th>
<th>Expiration</th>
<th>Batch</th>
<th>LicenseKey</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{-- */$x=0;/* --}}
@foreach($license as $item)
{{-- */$x++;/* --}}
<tr>
<td><a href="{{ url('license', $item->id) }}">{{ $item->id }}</a></td>
<td>{{ $item->systems->count() }} of {{ $item->maxActivations }}</td>
<td>{{ $item->product->productName }}</td>
<td>{{ $item->subproduct->subproductName }}</td>
<td>{{ $item->licenseType->licenseType }}</td>
<td>{{ $item->expiration }}</td>
<td>{{ $item->batch }}</td>
<td>
<div class="keybox">
<input class="licensedisplay" type="text" onClick="this.setSelectionRange(0, this.value.length)" value="{{ $item->licenseKey }}" readonly>
</div>
</td>
<td>
<a href="{{ url('license/' . $item->id . '/edit') }}">
<button type="submit" class="btn btn-primary btn-xs">Update</button>
</a> /
{!! Form::open([
'method'=>'DELETE',
'url' => ['license', $item->id],
'style' => 'display:inline'
]) !!}
{!! Form::submit('Delete', ['class' => 'btn btn-danger btn-xs']) !!}
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="pagination"> {!! $license->render() !!} </div>
</div>
@endsection