Laravel, how to use form helper outside blade? -


for reason have write html::macro() return html tags.

html::macro('mymycro', function() {   $result = '<form id="xxx">...';   return = $result; } 

then can use html::mymacro() inside blade.

{{ html::mymacro() }} 

is possible use form helper form::open(), form::input() generate html tags inside macro don't have manually write tags???

if so, please suggest me how because of poor background in php , laravel, tried

... $result = form::open('some_parameters');  ... 

but didn't work, don't know can use form helper outside blade or not, please advise me.

thanks.

i dont see reason why not. works charm

form::macro('myform', function() {     $output = form::open(['url/to/post']);     $output .= form::text('firstname');     $output .= form::close();         return $output; });  // use in in regular php view... echo form::myform();  // ... or blade view {{ form::myform() }} 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -