⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.53
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
mydetails.biz
/
app
/
Http
/
Controllers
/
View File Name :
WebhookController.php
all(), [ 'module' => 'required|unique:webhooks,module,NULL,id,created_by,' . \Auth::user()->creatorId(), 'method' => 'required', 'url' => 'required|', ] ); if ($validator->fails()) { $messages = $validator->getMessageBag(); return redirect()->back()->with('error', $messages->first()); } $webhook = new Webhook(); $webhook->module = $request->module; $webhook->method = $request->method; $webhook->url = $request->url; $webhook->created_by = Auth::user()->creatorId(); $webhook->save(); return redirect()->back()->with('success' , __('Webhook setting created successfully')); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $webhook = Webhook::where('id', $id)->where('created_by', Auth::user()->id)->first(); $module = Webhook::$module; $method = Webhook::$method; return view('webhook.edit', compact('webhook','module','method')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $webhook['module'] = $request->module; $webhook['method'] = $request->method; $webhook['url'] = $request->url; $webhook['created_by'] = Auth::user()->creatorId(); Webhook::where('id', $id)->update($webhook); return redirect()->back()->with('success', __('Webhook Setting Succssfully Updated')); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $webhook = Webhook::find($id); if ($webhook) { $webhook->delete(); return redirect()->back()->with('success', __('Webhook Setting successfully deleted .')); } else { return redirect()->back()->with('error', __('Something is wrong.')); } } }