Support the ongoing development of →
Views Blade
Last updated 3 months ago.

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

Last updated 6 years ago.

yep, tested!!

//console command
$this->info('Hello console!');

        $viewHandler = \App::make('Illuminate\View\Factory');

        $data = ['test' => '123'];

        $rendered = $viewHandler->make('test',$data);




Hello Blade!

{!! $test !!}

Please give feedback, marks as solution maybe?? :D

Last updated 6 years ago.

Works like a charm! Sorry so late marking it as solution!


Sign in to participate in this thread!


Your banner here too?

DocArzt DocArzt docarzt Joined 16 Jul 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.