/** * Show the form for editing the specified resource. * * @param Quote $quote * * @return Response * @internal param int $id */ public function edit(Quote $quote) { $authors = Author::lists('name', 'id')->all(); $categories = Category::lists('name', 'id')->all(); $categoriesOfImages = ImageCategory::lists('name', 'id')->all(); return view('admin.quote.edit', compact('quote'))->withTitle('Edit: ' . $quote->title)->withAuthors($authors)->withCategories($categories)->with('categoriesOfImages', $categoriesOfImages); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $book = Book::find($id); $authors = Author::lists('name', 'author_id'); $genres = Genre::lists('name', 'genre_id'); return view('books/book-edit', ['id' => $id, 'authors' => $authors, 'genres' => $genres]); }
public function allNames() { return Author::lists('name', 'id')->all(); }
public function edit(Article $article) { $authors = Author::lists('name', 'id')->all(); return view('articles.edit', compact('article', 'authors')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $authors = Author::lists('author_name', 'id'); $book = Book::findOrFail($id); return view('books.edit', compact('book', 'authors')); }