<?php /* add in custom route */ Routing::custom('lunor', function ($extra) { if (isset($_POST['type']) && !empty($_POST['type'])) { $type = $_POST['type']; $return['sucess'] = false; switch ($type) { case 'content_block': contentBlock($_POST['content_block']); break; case 'contactus': EmailUtil::fromContactUs($return); break; default: $return['error'] = 'Invalid Type.'; break; } echo json_encode($return); return true; } return false; });