CI 3 and GroceryCrud Object Issue |
Okay,
Code Igniter has been great to program with. However I am running into a issue with my templating and view. I would like to pass the grocerycrud object (rendered) to my view via the data variable, and it gives me an error. My other pages work great, and everything is fine, EXCEPT trying to get a Grocery CRUD on one of my views. Any help would be greatly appreciated. Message: Object of class stdClass could not be converted to string I have a template library, view, and controller below. Controller: PHP Code: public function users() View: Has a PHP echo $output Template: PHP Code: <?php
Hi,
If you look at the documentation on GroceryCrud Website, you will see the output of render is an object with the folowing 3 properties: output, js_files and css_files. So in your example your $output variable can not be echo as it is an object you need to echo the output property: PHP Code: echo $output->output; A good decision is based on knowledge and not on numbers. - Plato
|
Welcome Guest, Not a member yet? Register Sign In |