/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $token = Input::get('token', ''); if ($token != '') { $compare = GlobalLibrary::compareToken($token); if ($compare) { $users_by = Input::get('ub', ''); $content_id = Input::get('ci', ''); $users_dest = Input::get('ud', ''); $banned_report_message = Input::get('brm', ''); $banned_report = array('users_by' => $users_by, 'content_id' => $content_id, 'users_dest' => $users_dest, 'banned_report_message' => $banned_report_message); $bannedreport = table_banned_report::create($banned_report); return (new Response(array('status' => true, 'msg' => 'Report successfully'), 200))->header('Content-Type', "json"); } else { return (new Response(array('status' => false, 'msg' => 'Report Failed'), 200))->header('Content-Type', "json"); } } else { return (new Response(array('status' => false, 'msg' => 'Report Failed'), 200))->header('Content-Type', "json"); } }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { table_banned_report::find($id)->delete(); return redirect('admin/banned-report')->with('warning', 'Data have been removed!'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { table_banned_report::find($id)->delete(); return redirect('admin/banned-report')->with('warning', 'Data berhasil dihapus!'); }