I am probably missing something really obvious here so forgive me if that's the case.
I have a HTML Editor on a form and when I post the HTML to my controller the HTML is gone and therefore is not getting saved to the database.
Please see the image below.
Controller Function (this runs)
public function update(Request $request,Template $template){
dd($request->all()); // code stops here
$template->subject = $request->input('subject');
$template->body = clean($request->input('body'),'custom');
$template->save();
return response()->json(['message' => trans('messages.template').' '.trans('messages.saved'), 'status' => 'success']);
}
I found the issue. I had some code that stripped all HTML from in the form of Middleware.
Hopefully this will help anyone learning/taking over someone's code. Look in the App\Http\kernal.php file to see if there is anything overriding your request data.