I'm using Laravel blades/views to generate files by templates from the custom console command. Unfortunately, any of the variants from official documentation are not working.
This is how I'm trying to pass data to the view:
$info = 'Some info';
view('my_template', compact('info'));
or
view('my_template', ['info'=>'Some info']);
or
view('my_template')->with(['info'=>'Some info']);
or
use \View as View;
View:make('my_template',['info'=>'Some info']);
I would highly appreciate any help!