Page 80 - Laravel5_v1
P. 80

@extends('layouts.app')

                 @section('content')
                 <div class="container">
                     <div class="row">
                         <div class="col-md-10 col-md-offset-1">

                                                                                ้
                             <?= link_to('books/create', $title = 'เพิ มขอมูล', ['class' => 'btn btn-
                 primary'], $secure = null); ?>

                             <hr>

                             <div class="panel panel-default">
                                                                         ้
                                                                                 ํ
                                 <div class="panel-heading">แสดงขอมูลหนังสือ จานวนทั งหมด {{   $books-
                 >total()   }} เล่ม</div>
                                 <div class="panel-body">

                                     <table class="table table-striped">
                                         <tr>
                                             <th>รหัส</th>
                                                        ื
                                             <th>ชอหนังสือ</th>
                                             <th>ราคา</th>
                                             <th>หมวดหนังสือ</th>
                                                        ู
                                             <th>รปภาพ</th>
                                                         ้
                                             <th>แกไข</th>
                                             <th>ลบ</th>
                                         </tr>
                                         @foreach ($books as $book)
                                         <tr>
                                             <td>{{   $book->id   }}</td>
                                             <td>{{   $book->title }}</td>
                                             <td>{{   number_format($book->price,2)   }}</td>
                                             <td>{{   $book->typebooks->name   }}</td>
                                             <td>
                                                 <a href="{{ asset('images/'.$book->image) }}"
                 data-lity><img src="{{ asset('images/resize/'.$book->image) }}"></a>
                                             </td>
                                             <td><a href="{{ url('/books/'.$book->id.'/edit')
                 }}"><i class="fa fa-pencil"></i></a></td>
                                             <td>
                                                 <?= Form::open(array('url' => 'books/' . $book-
                 >id, 'method' => 'delete')) ?>
                                                 <button type="submit" class="btn btn-danger"><i
                 class="fa fa-trash"></i></button>
                                                 {!! Form::close() !!}
                                             </td>
   75   76   77   78   79   80   81   82   83   84   85