Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function edit($id)
- {
- $authors = Author::findOrFail($id);
- return view('backend.authors.form', compact('authors'));
- }
- /**
- * Update the specified resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @param int $id
- * @return \Illuminate\Http\Response
- */
- public function update(Request $request, $id)
- {
- $this->validate($request, [
- 'name' => 'required|string'
- ]);
- $authors = Author::findOrFail($id);
- $authors->update($request->all());
- return $authors;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement