Reputation: 21
i want to pass a variable to view file. i am using the following code:
View::factory('admin/modules/video_category')->set($x, $parent_id);
to pass value of $parent_id to $x but $x variable is showing null. please advise how to do this correctly.
Upvotes: 1
Views: 1416
Reputation: 7042
View::factory('some_view')->set('variable_name', $value);
and than in the view, you can call $variable_name
.
Upvotes: 2