public function webhook(Request $request)
    {
        $this->validate($request, [
            'webhook' => 'required|url',
            'low' => 'required|boolean',
            'medium' => 'required|boolean',
            'high' => 'required|boolean',
        ]);

        Recipient::create([
            'type' => 'webhook',
            'address' => $request->webhook,
            'low' => $request->low,
            'medium' => $request->medium,
            'high' => $request->high,
        ]);

        return redirect(route('eyewitness.settings.index').'#recipients')->withSuccess('The Webhook recipient has been created. You can now click the button on the recipient and instantly send a "test notification" to ensure it is working.');
    }
public function webhook(Request $request)
    {
        $this->validate($request, [
            'webhook' => 'required|url',
            'low' => 'required|boolean',
            'medium' => 'required|boolean',
            'high' => 'required|boolean',
        ]);

        Recipient::create([
            'type' => 'webhook',
            'address' => $request->webhook,
            'low' => $request->low,
            'medium' => $request->medium,
            'high' => $request->high,
        ]);

        return redirect(route('eyewitness.settings.index').'#recipients')->withSuccess('The Webhook recipient has been created. You can now click the button on the recipient and instantly send a "test notification" to ensure it is working.');
    }
public function webhook ( Request $ request ) { $ this -> validate ( $ request , [ 'webhook' => 'required|url' , 'low' => 'required|boolean' , 'medium' => 'required|boolean' , 'high' => 'required|boolean' , ] ) ; Recipient :: create ( [ 'type' => 'webhook' , 'address' => $ request -> webhook , 'low' => $ request -> low , 'medium' => $ request -> medium , 'high' => $ request -> high , ] ) ; return redirect ( route ( 'eyewitness.settings.index' ) . '#recipients' ) -> withSuccess ( 'The Webhook recipient has been created. You can now click the button on the recipient and instantly send a "test notification" to ensure it is working.' ) ; }
Create a Webhook recipient.

@param  Request  $request
@return \Illuminate\Http\Response
Create a Webhook recipient .