Best way to store html template (Laravel 5)

Active3 hr before
Viewed126 times

2 Answers


You may display data that is passed to your Blade views by wrapping the variable in curly braces. For example, given the following route:,For example, imagine we are building a "todo" list application. We might define a layout component that looks like the following:,You are not limited to displaying the contents of the variables passed to the view. You may also echo the results of any PHP function. In fact, you can put any PHP code you wish inside of a Blade echo statement:,{note} Be very careful when echoing content that is supplied by users of your application. You should typically use the escaped, double curly brace syntax to prevent XSS attacks when displaying user supplied data.

Blade views may be returned from routes or controller using the global view helper. Of course, as mentioned in the documentation on views, data may be passed to the Blade view using the view helper's second argument:

Route::get('/', function() {
   return view('greeting', ['name' => 'Finn']);
load more v

The above one is really useful when you want to render HTML from database to view blade.,3. Using html_entity_decode() function,√You want to render HTML from database,You use html_entity_decode in laravel if 

If your controller passes a string variable to laravel blade,

$str = "This is my html render";
load more v

Other "template-store" queries related to "Best way to store html template (Laravel 5)"