/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $books = Book::latest()->NotRented()->get(); return view('home', compact('books')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $books = Book::latest('id')->get(); return view('admin/library/index')->with('books', $books); }