david19
1 week ago

Blade @include via controller

Posted 1 week ago by david19

Hello Team. I try this,

public function index(){

    $test = "@include('test')";

    return view('welcome')->with('test',$test);
  }
{!!$test!!}

Laravel output this as a string in the blade file. Its not include the "test.blade.php".

Please sign in or create an account to participate in this conversation.