listRoom.blade.php 3.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
@extends('adminlte::layouts.app')

@section('htmlheader_title')
    {{ trans('adminlte_lang::message.home') }}
@endsection

@section('main-content')
    <div class="container-fluid spark-screen">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="panel panel-default">
                    <div id="app">

                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                                <strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif
                        <br>
                        <div class="col-md-4 col-sm-6 col-xs-12">
                            <div class="info-box bg-info">
                                <span class="info-box-icon bg-yellow"><i class="glyphicon glyphicon-modal-window"></i></span>

                                <div class="info-box-content">
                                    <span class="info-box-text">List Room</span>
                                    <span class="info-box-number">{{$count}}</span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                        <br>

                        <table class="table table-striped">
                            <tr>
41
                                <th>No Kamar</th>
42
                                <th>Jumlah Bed</th>
43 44 45
                                <td>Detail</td>
                                <td>Edit</td>
                                <td>Delete</td>
46 47
                            </tr>
                            @foreach($data as $a)
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
                                <tr>
                                    <td>{{$a->nomor_kamar}}</td>
                                    <td>{{$a->jumlah_bed}}</td>
                                    <td>
                                        <a href="{{url('room/'.$a->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-eye-open"></i></a>
                                    </td>
                                    <td>
                                        <a href="{{url('room/'.$a->id.'/edit')}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"></i></a>
                                    </td>
                                    <td>
                                        <form action="{{url('room/'.$a->id)}}" method="POST">
                                            {{csrf_field()}}
                                            <input type="hidden" name="_method" value="DELETE">
                                            <button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></button>
                                        </form>
                                    </td>
                                </tr>

66 67 68 69 70 71 72 73 74 75 76 77 78

                            @endforeach
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection