has('entity') && request()->has('entity_id')) { $class = 'App\Models\\'.ucfirst(request()->input('entity')); $entity_obj = $class::whereId(request()->input('entity_id'))->company()->first(); } $subject = request()->input('subject'); $body = request()->input('body'); $data = [ 'subject' => request()->input('subject'), 'body' => Parsedown::instance()->text(request()->input('body')), ]; return response()->json($data, 200); } }