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



class Reportsee_kController extends Controller {



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


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

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


} 