@extends('admin.master')

@section('content')
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-dark">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-md-6">
                            <!-- 標題 -->
                            <div class="panel-title">老虎管理</div>
                        </div>
                        <div class="col-md-6" style="text-align: right">
                            <!-- 新增按鈕端點 -->
                            <a class="btn btn-darkblue btn-xs" href="{{ url('/backend/zooManagement/tigerManagement/create') }}"><strong>Add</strong></a>
                        </div>
                    </div>
                </div>
                <table class="table table-hover" cellspacing="0" width="100%">
                    <thead>
                    <tr>
                        <!-- 欄位名稱 -->
                        <th>自增量</th>
                        <th>老虎名字</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    <!-- 列表渲染 -->
                    @foreach($operdata as $tiger)
                        <tr>
                            <!-- 顯示用欄位 -->
                            <td>{{ $tiger['id'] }}</td>
                            <td>{{ $tiger['tigerName'] }}</td>
                            <!-- 控制用按鈕 -->
                            <td style="text-align: right">
                                <form method="post" action="{{ url('/backend/zooManagement/tigerManagement/'.$tiger['id']) }}">
                                    <!-- 編輯 -->
                                    <a class="btn btn-warning btn-xs" href="{{ url('/backend/zooManagement/tigerManagement/edit/'.$tiger['id']) }}">
                                        <strong>Edit</strong>
                                    </a>
                                {{ csrf_field() }}
                                {{ method_field('DELETE') }}
                                <!-- 刪除 -->
                                    <button type="submit" class="btn btn-danger btn-xs"><strong>Delete</strong></button>
                                </form>
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
@endsection
