Exemple #1
0
 public function index()
 {
     $authors = Author::all();
     //$authors=author::where('id','>=','1');
     $paginatedAuthors = Author::paginate(5);
     //dd($paginatedAuthors);
     return View('authors.index', compact('authors'))->with('paginatedAuthors', $paginatedAuthors);
     //return View::make('authors.index')->with('title','Authors and Books');
 }
 public function destroy(Author $author)
 {
     //$author = author::findOrFail($id);
     $author->delete();
 }