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
Post a Comment