/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(int $id) { $setData['groupUser'] = GroupUser::where('status', 1)->get(); $setData['data'] = User::where('id', $id)->get(); $setData['actionLink'] = action('Admin\\UserController@update', ['id' => $id]); if ($setData['data']) { $setData['action'] = 'edit'; return View::make('admin.user.add_edit', $setData); } else { return abort(404); } }
public function destroy(int $id) : int { return GroupUser::where('id', $id)->first()->delete(); }