public function index() { $book = Book::paginate(10); //$user = User::All(); return view('userbook/index', array('books' => $book)); //return view('userbook/index', array('books' => $book), array('users' => $user)); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $book = Book::paginate(10); return view('userbook/index', array('books' => $book)); }
/** * Display a listing of the Books which adding to user with id. * * @return Response */ public function listAddingBook($user_id) { $books = Book::paginate(10); return view('book/index', ['books' => $books, 'user_id' => $user_id]); }