route;
        $data['title'] = $this->title;
        $data['provinsi'] = Provinsi::where('kode_wilayah','010000')->get();
        return view($this->template.'.index',$data);
    }
    public function grid(Request $request)
    {
        $kuesioner = Kuesioner::where('level',2)->orderBy('created_at','DESC')->get();
        foreach ($kuesioner as $key => $row) {
            $action = '';
            if((permission('is_create', $this->route.'.*','module',false)) || (permission('is_update', $this->route.'.*','module',false))){
                $action .= '';
            }
            if($row->level == 0){
                $penghargaan = ' Belum Pernah';
            }elseif($row->level == 1){
                $penghargaan = ' Adiwiyata Kab/Kota';
            }elseif($row->level == 2){
                $penghargaan = ' Adiwiyata Provinsi';
            }elseif($row->level == 3){
                $penghargaan = ' Adiwiyata Nasional';
            }elseif($row->level == 4){
                $penghargaan = ' Adiwiyata Mandiri';
            }
            $sekolah = '';
            $sekolah .= @$row->sekolah->nama_sekolah.'
';
            $sekolah .= ''.@$row->profile->tingkat->name.' ';
            $sekolah .= ''.@$row->profile->status_sekolah.' ';
            $_data[] = [
                'no'                => $key+1,
                'id'                => encode_id($row->id),
                'npsn'              => $row->sekolah->npsn,
                'nama'              => $sekolah,
                'wilayah'           => $row->sekolah->kabupaten->name,
                'penghargaan'       => $penghargaan,
                'action'            => $action,
            ];
        }
        return response()->json($_data);
    }
    /**
     * Show the form for creating a new resource.
     */
    public function create()
    {
        //
    }
    /**
     * Store a newly created resource in storage.
     */
    public function store(Request $request)
    {
        //
    }
    /**
     * Display the specified resource.
     */
    public function show(string $id)
    {
        //
    }
    /**
     * Show the form for editing the specified resource.
     */
    public function edit(string $id)
    {
        //
    }
    /**
     * Update the specified resource in storage.
     */
    public function update(Request $request, string $id)
    {
        //
    }
    /**
     * Remove the specified resource from storage.
     */
    public function destroy(string $id)
    {
        //
    }
}