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'); $body = Parsedown::instance()->text(request()->input('body')); $subject = Parsedown::instance()->text(request()->input('subject')); return response()->json($body, 200); } }