php - Passing data into a partial -


I want to pass partial data partially, this partial is being called from another view.

  $ posts = ["one", "two", "three"]; See Return: Creating ('Partial Post.', '$');   

.blade.php inside the file I am

  {{$ posts}}  < / Pre> 

This return and error undefined variable: Post Can someone tell me what I am doing wrong? Thanks

Can anyone tell me what I am doing?

The template you are using includes an undefined variable, here has been posted .

It is important that you define all the variables to use with a view.

You pass such a variable as an array where the key is the name of the variable and the value is the data that:

  view :: create ( 'Template-of-post-variable', array ('post' = & gt; $ posts);   

This is the second parameter, the first parameter is the name of the template.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -