<?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_m;
use Illuminate\Support\Facades\DB;



class Reportsee_mController extends Controller {



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


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

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


} 