<?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\Reportsee_p;
use Illuminate\Support\Facades\DB;



class Reportsee_pController extends Controller {



    public function index() {
      $verifikasis_p_manager = DB::table('verifikasi_pengunjung_manager')->paginate(10);
      
        return view('seeReportPengunjungManager.index',['verifikasis_p_manager' => $verifikasis_p_manager]);
    }


  public function edit($id)
  {
    // get the nerd
    $verifikasis_p_manager = Reportsee_p::find($id);
    //dd($verifikasis_p_manager);
    return view('seeReportPengunjungManager.edit', compact('verifikasis_p_manager'));
  }
     
  public function update(Request $request, $id)
    {
        $this->validate($request,['status'=> 'required',]);

        
       $verifikasis_p_manager = Reportsee_p::find($id);
        $verifikasis_p_manager->status = $request->status;
        $verifikasis_p_manager->save();
        return redirect()->route('seeReportPengunjungManager.index')->with('alert-success','Data Hasbeen Saved');
    }


} 