id)->first(); return view('client-side.masyarakat.profile', compact(['masyarakat'])); } /** * Store a newly created resource in storage. * * @param \App\Http\Requests\StoreMasyarakatRequest $request * @return \Illuminate\Http\Response */ public function store(StoreMasyarakatRequest $request) { $masyarakat = Masyarakat::where('user_id', $request->user_id)->first(); $masyarakat->jenis_kelamin = $request->jenis_kelamin; $masyarakat->alamat = $request->alamat; $masyarakat->tempat_lahir = $request->tempat_lahir; $masyarakat->tanggal_lahir = $request->tanggal_lahir; $masyarakat->nohp = $request->nohp; $masyarakat->save(); return Redirect::route('masyarakat.create')->with('message', 'Berhasil memperbarui profil'); } /** * Display the specified resource. * * @param \App\Models\Masyarakat $Masyarakat * @return \Illuminate\Http\Response */ public function show(Masyarakat $Masyarakat) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\Masyarakat $Masyarakat * @return \Illuminate\Http\Response */ public function edit(Masyarakat $Masyarakat) { // } /** * Update the specified resource in storage. * * @param \App\Http\Requests\UpdateMasyarakatRequest $request * @param \App\Models\Masyarakat $Masyarakat * @return \Illuminate\Http\Response */ public function update(UpdateMasyarakatRequest $request, Masyarakat $Masyarakat) { // } /** * Remove the specified resource from storage. * * @param \App\Models\Masyarakat $Masyarakat * @return \Illuminate\Http\Response */ public function destroy(Masyarakat $Masyarakat) { // } }