Sorry im ok mobile cant test,
But how are you trying to render it??
$contents = \View::make('youview');
Using this way, to use the facade.
Or at top of your command class
Use View;
And then u can remove the backslash
I think before code should try but also you can on your command
$viewHandler = \App::make('Illuminate\View\Factory'); Cant say by reminding, would have to be in computer
$rendered = $viewHandler->make('yourview');
Sorry again on mobile, but what u want is axhievable, i think i put you in the right track
yep, tested!!
//console command
$this->info('Hello console!');
$viewHandler = \App::make('Illuminate\View\Factory');
$data = ['test' => '123'];
$rendered = $viewHandler->make('test',$data);
$this->info($rendered);
die();
//test.blade.php
Hello Blade!
{!! $test !!}
Please give feedback, marks as solution maybe?? :D
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community