示例#1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if ($this->checkauth(9)['err'] == 1) {
         return $this->checkauth(9)['view'];
     }
     $div = Divisi::where('deleted_at', NULL)->get();
     $data = Category::where('id', $id)->first();
     return view('admin.category.edit')->with(array('category' => $data, 'divisi' => $div));
 }
示例#2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($this->checkauth(9)['err'] == 1) {
         return $this->checkauth(9)['view'];
     }
     Divisi::where('id', $id)->delete();
     return redirect(url('admin/divisi'));
 }