/**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create($id)
 {
     return view('ukm.article.create')->withUser(\Auth::user())->withUkm(Ukm::find($id));
 }
Exemple #2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $ukm = \App\Model\Ukm\Ukm::find($id);
     $ukm->name = $request->name;
     $ukm->profile_picture = $request->profile_picture;
     $ukm->long_description = $request->long_description;
     $ukm->save();
     return redirect()->route('ukm.manage', [$id]);
 }