Last active
August 29, 2015 14:14
-
-
Save coreymcmahon/43bdd8523779d2bb95bd to your computer and use it in GitHub Desktop.
admin/products/index.php - A Pattern for Reusable Resource Controllers in Laravel 4.2 http://slashnode.com/reusable-resource-controllers/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.master') | |
@section('title', 'Products') | |
@section('content') | |
<h2>Products</h2> | |
<table class="table table-striped"> | |
<thead> | |
<tr> | |
<th>ID</th> | |
<th>Name</th> | |
<th></th> | |
</tr> | |
</thead> | |
<tbody> | |
@if (count($items)) | |
@foreach($items as $item) | |
@include('admin.products.row', ['item' => $item]) | |
@endforeach | |
@else | |
<tr class="text-muted center"> | |
<td colspan="3">(No products to display)</td> | |
</tr> | |
@endif | |
</tbody> | |
</table> | |
<div> | |
{{ $items->links() }} | |
</div> | |
<div> | |
<a href="{{ route('admin.products.create') }}" class="btn btn-success pull-right"> | |
<span class="fa fa-plus"> </span> Create Product | |
</a> | |
</div> | |
@stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment