Skip to content
Advertisement

Tag: view

How to use CI4 parser service to render view from module

I’m trying to load views from module folder, since CI always look for views in App/View folder, how this can be overwritten to give complete path from ROOTPATH instead of APPPATH/Views Error CodeIgniterViewExceptionsViewException Invalid file: {path/to/project}/app/Config/../Views/modules/PluginName/Views/index.php Answer You are using a path relative to the default Views path. You could either: 1. Edit the line below in your Config/Path.php file

Undefined database variable

Blog.php code below: blog_index.php code below: I can’t see where is my mistake, it raises a errorException: “Undefined Variable:dados”. About $categorias variable, am learning how to use more than one table per controller. Codeigniter version: 4.0.4 Running through xampp Answer Controller Blog.php View blog_index.php Note :- For Reference see this:- https://codeigniter4.github.io/userguide/outgoing/views.html#adding-dynamic-data-to-the-view

Advertisement