what is laravel render() method for?

后端 未结 3 1796
忘了有多久
忘了有多久 2020-12-06 07:44

I didn\'t deal with render method yet !!
is it for blade template ?
I have to pass dynamic data in blade.php file dynamically.

3条回答
  •  自闭症患者
    2020-12-06 08:19

    You can get php blade file with passing dynamic value in a string form

    Like this

    Blade

     
    

    Controller

    $html = view('User::html-file',['url'=>'https://stackoverflow.com'])->render();
    

    O/P

    \r\n
    

提交回复
热议问题