/** * Parses and compiles strings by using Blade Template System * * @return string */ private function blader($str, $data = array()) { $parsed_string = Blade::compile_string($str); ob_start() and extract($data, EXTR_SKIP); try { eval('?>' . $parsed_string); } catch (\Exception $e) { ob_end_clean(); throw $e; } $str = ob_get_contents(); ob_end_clean(); return $str; }