コード例 #1
0
ファイル: DropController.php プロジェクト: Bogstag/bogstag.se
 /**
  * Store a newly created resource in storage.
  *
  * @param \Illuminate\Http\Request $request
  *
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $emailstat = new Emaildrop();
     $emailstat->sender = $request->input('sender');
     $emailstat->subject = $request->input('subject');
     $emailstat->Spf = $request->input('X-Mailgun-Spf');
     $emailstat->Spamscore = $request->input('X-Mailgun-Sscore');
     $emailstat->Spamflag = $request->input('X-Mailgun-Sflag');
     $emailstat->DkimCheck = $request->input('X-Mailgun-Dkim-Check-Result');
     $emailstat->public = $request->input('public');
     $emailstat->recipient = $request->input('recipient');
     $emailstat->bodyplain = $request->input('body-plain');
     $emailstat->messageheaders = $request->input('message-headers');
     $emailstat->save();
 }
コード例 #2
0
ファイル: EmailCharts.php プロジェクト: Bogstag/bogstag.se
 /**
  * @return mixed
  */
 public function getEmailDropsChart()
 {
     $dataTableRows = Emaildrop::select(DB::raw("DATE_FORMAT(created_at, '%Y-%m-%d') as Date, COUNT('id') AS Count"))->groupBy(DB::raw("DATE_FORMAT(created_at, '%Y-%m-%d')"))->orderby('Date', 'asc')->take(100)->get();
     $dataTableColumns = [['date', 'Date'], ['number', 'Count']];
     $name = 'emaildrops';
     $title = 'Droped by custom rule';
     $dateFormat = 'Y-m-d';
     return (new Chart\LineChartController())->createLineChart($name, $title, $dataTableColumns, $dataTableRows, $dateFormat);
 }
コード例 #3
0
 /**
  * Display the specified resource.
  *
  * @param int $id
  *
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $title = 'EmailDrop ' . $id;
     $emailDrop = Emaildrop::find($id);
     return view('admin.dashboard.emaildrop.EmailDrop', ['title' => $title, 'emaildrop' => $emailDrop]);
 }
コード例 #4
0
 /**
  * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index()
 {
     $title = 'Dashboard';
     $emailDrop = Emaildrop::count();
     return view('admin.dashboard.index', compact('title', 'emailDrop', 'externalApiLimits'));
 }