PHP Classes

File: src/stubs/views/index.blade.php.stub

Recommend this page to a friend!
  Classes of TJ Webb  >  Laravel CRUD Generator  >  src/stubs/views/index.blade.php.stub  >  Download  
File: src/stubs/views/index.blade.php.stub
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel CRUD Generator
Generate MVC classes for any Laravel model
Author: By
Last change:
Date: 2 years ago
Size: 1,211 bytes
 

Contents

Class file image Download
@extends('crud-layout')
@section('header')
<div class="row">
    <div class="col-lg-12 margin-tb">
        <div class="pull-left">
            <h2>All {MODEL_PLURAL}</h2>
        </div>
        <div class="pull-right">
            <a class="btn btn-success" href="{{ route('{ROUTES}.create') }}"> Create New {MODEL}</a>
        </div>
    </div>
</div>
@endsection

@section('content')
<table class="table table-bordered">
    <tr>
{INDEX_HEADERS}
        <th width="280px">Action</th>
    </tr>
    @foreach (${VARIABLE_PLURAL} as ${VARIABLE})
        <tr>
{INDEX_COLUMNS}
            <td>
                <form action="{{ route('{ROUTES}.destroy', ${VARIABLE}->id) }}" method="POST">
                    <a class="btn btn-info" href="{{ route('{ROUTES}.show', ${VARIABLE}->id) }}">Show</a>
                    <a class="btn btn-primary" href="{{ route('{ROUTES}.edit', ${VARIABLE}->id) }}">Edit</a>
                    @csrf
                    @method('DELETE')
                    <button type="submit" onclick="return confirm('Are you sure you want to delete this item?');" class="btn btn-danger">Delete</button>
                </form>
            </td>
        </tr>
    @endforeach
</table>
@endsection
For more information send a message to info at phpclasses dot org.