Last active
February 13, 2017 05:45
-
-
Save evercode1/5fcf13cb030087347b81acf4be4c47fa to your computer and use it in GitHub Desktop.
chapter 15 show.blade.php
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') | |
| <title>Category</title> | |
| @endsection | |
| @section('content') | |
| <ol class='breadcrumb'> | |
| <li><a href='/'>Home</a></li> | |
| <li><a href='/category'>Categories</a></li> | |
| <li><a href='/category/{{ $category->id }}'>{{ $category->name }}</a></li> | |
| </ol> | |
| <h1>Category Details</h1> | |
| <hr/> | |
| <div class="panel panel-default"> | |
| <!-- Table --> | |
| <table class="table table-striped"> | |
| <thead> | |
| <tr> | |
| <th>Id</th> | |
| <th>Name</th> | |
| <th>Date Created</th> | |
| <th>Edit</th> | |
| <th>Delete</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>{{ $category->id }} </td> | |
| <td> <a href="/category/{{ $category->id }}/edit"> | |
| {{ $category->name }}</a></td> | |
| <td>{{ $category->created_at }}</td> | |
| <td> <a href="/category/{{ $category->id }}/edit"> | |
| <button type="button" class="btn btn-default">Edit</button></a></td> | |
| <td> | |
| <div class="form-group"> | |
| <form class="form" role="form" method="POST" | |
| action="{{ url('/category/'. $category->id) }}"> | |
| <input type="hidden" name="_method" value="delete"> | |
| {{ csrf_field() }} | |
| <input class="btn btn-danger" Onclick="return ConfirmDelete();" | |
| type="submit" value="Delete"> | |
| </form> | |
| </div> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| @endsection | |
| @section('scripts') | |
| <script> | |
| function ConfirmDelete() | |
| { | |
| var x = confirm("Are you sure you want to delete?"); | |
| return x; | |
| } | |
| </script> | |
| @endsection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment