php - Dynamic content replacement in Laravel with masks -


i updating custom cms codeigniter laravel. uses custom masks (currently in single curly brackets) allows user entered content dynamically updated values entered elsewhere.

codeigniter gave neat way of doing the page parser passed associative array (such favouritefruit=>'apple') - replace relevant masks on entire page prior output. meant masks used anywhere.

trying find neat way of doing in laravel 4.2. ->render() view variable , str_replace prior controller returning it, wondering if there 'native' way perhaps using blade.

in short trying run mask replacement twice on same data.

thanks!

a string replace on whole view pretty easy actually. call render() , view string:

$view = view::make('view.name')->render(); $view = str_replace('{mask}', 'value', $view); return $view; 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -