Appending Laravel Blade from JQuery

后端 未结 2 1193
-上瘾入骨i
-上瘾入骨i 2021-01-27 11:04

I am trying to append Blade syntax from Laravel but can\'t get the browser to understand Blade. When I append the Blade syntax from my js file it output the code onto the page.<

2条回答
  •  孤独总比滥情好
    2021-01-27 11:38

    you can generate your view in your controller. and append it to your jQuery

    //blade
    $html = view('someView')->render();
    retrun json_encode($html)
    

    And in your blade you can do something like this

    
    
                                     
                  
提交回复
热议问题