FileViewFinder.php第137行中的InvalidArgumentException:未找到View [books.edit]

时间:2016-07-18 16:18:36

标签: laravel-5.1

我得到的错误就像 FileViewFinder.php第137行中的InvalidArgumentException:未找到View [books.edit] 我的路线 路线::资源( '书', 'BookController的');
Route :: get('books','BookController @ index');
Route :: get('books / edit / {id}','BookController @ edit');

My View<br>

@extends('layout/template')

@section('content')
 <h1>BookStore</h1>
 <a href="{{url('/books/create')}}" class="btn btn-success">Create Book</a>
 <hr>
 <table class="table table-striped table-bordered table-hover">
     <thead>
     <tr class="bg-info">
         <th>Id</th>
         <th>ISBN</th>
         <th>Title</th>
         <th>Author</th>
         <th>Publisher</th>
         <th>Thumbs</th>
         <th colspan="3" style="text-align: center;">Actions</th>
     </tr>
     </thead>
     <tbody>
     @foreach ($books as $book)
         <tr class="bg-info">
             <td>{{ $book->id }}</td>
             <td>{{ $book->isbn }}</td>
             <td>{{ $book->title }}</td>
             <td>{{ $book->author }}</td>
             <td>{{ $book->publisher }}</td>
             <td><img src="{{asset('img/'.$book->image.'.jpg')}}" height="35" width="30"></td>
             <td><a href="{{url('books',$book->id)}}" class="btn btn-primary">Read</a></td>
             <td><a href="{{url('books/edit',$book->id)}}" class="btn btn-warning">Update</a></td>
             <td>
             {!! Form::open(['method' => 'DELETE', 'route'=>['books.destroy', $book->id]]) !!}
             {!! Form::submit('Delete', ['class' => 'btn btn-danger']) !!}
             {!! Form::close() !!}
             </td>
         </tr>
     @endforeach

     </tbody>

 </table>
@endsection

1 个答案:

答案 0 :(得分:1)

我修复了我的视图文件的问题

一些变化

我添加了html表单。