情 事 故
Contact
Blog Gaming Media AMA

Categories

Social & Communication (42) Gaming (40) Art (26) Software & Applications (23) Science & Technology (22) Anime (15) Uncategorized (14) News, politics, & society (7)

Tags

#Personal (124)
#Daily (40)
#Web Development (32)
#zeah (21)
#joe jiko (21)
#facebook (19)
#Writing (15)
#photos (15)
#Archive (12)
#thoughts (12)
#conversations (11)
#poems (11)
#relationships (11)
#Pets & animals (11)
#twitter (10)
#rotd (9)
#photo (9)
#Web Design (9)
#Changelog (9)
#border collie (9)
Forced update
/Software & Applications
View post
Major update
/Software & Applications
View post
/Uncategorized
View post
No twitch audio on some streams
/Software & Applications
View post
Discord servers
/Gaming
View post
View all categories
View all tags
Go to blog

Now Playing

Shadow of the Tomb Raider
Naruto to Boruto: Shinobi Striker
Tower of Time
Monster Hunter: World
Overload
Elven Assassin
Super Smash Bros. Ultimate
Citadel: Forged with Fire
Dragon Quest XI: Echoes of an Elusive Age
Karnage Chronicles
The Elder Scrolls V: Skyrim
Hellblade: Senua's Sacrifice
Gorn
Superhot VR
Sid Meier's Civilization V
Star Trek: Bridge Crew
Space Pirate Trainer

Platforms

PC NSW
View all games
Play with me
Watch live streams
Anime Anime AMA Ask me anything Art Artwork Img Photos Music Music Playlist Software

Recently answered

#409

Do you sell your drawings?

View answer
#404

What color would a smurf turn if you choked it?

View answer
#403

Why do they sterilize needles for lethal injections?

View answer
#395

Your favorite spot in the bay area?

View answer
#378

why is the sky blue?

View answer
#376

Imagine you're looking at a painting that has every color in it. What color comes to mind first or stands out most?

View answer
Question asking isn't available yet.. Ask me something on twitter?
Ask a question
View all answers

Sign in

Sign in with Google
Sign in with Facebook
Terms of service Privacy policy
Home
Follow @joejiko for updates

Output Laravel 4 view as string

/ Uncategorized
11 Oct 2013
Updated on 02 Feb 2019
The answer seems really obvious once you know it.
[php]
->render();
[/php]
Used like this:
[php]
$nav_primary_data = json_decode(file_get_contents('navs/primary.json', true);
$view_string = View::make('layouts.master.navs.primary')->with('nav_primary_data', $data)->render();
[/php]
I'm not sure why it's not mentioned in the Views & Responses documentation.
But the method can be seen in the  API docs: \Illuminate\View\View
#php #Web Development #laravel #blade templates #render view #string output

Similar Posts


Example of how to simply keep your HTML clean
/ Uncategorized #Web Development
View post
Permalink for current milestone screenshot of JoeJiko.com
/ Uncategorized #Web Development
View post
Just kidding..
/ Uncategorized #web development
View post
CS-Cart 3.0.1 design mode - view storefront in customization mode not working (solved)
/ Uncategorized #Web Development
View post
Firebug: SyntaxError: syntax error [Break On This Error] <!doctype html>
/ Uncategorized #Web Development #web development
View post
New: Recently played games on Steam
#web development
View post