Welcome Guest, Not a member yet? Register   Sign In
[Solved] Problem with ci4-adminlte
#1

(This post was last modified: 02-02-2021, 02:35 AM by chiabgigi.)

Hi everyone.
I hope you can help me with this problem.
I downloaded from github ci4 with adminlte3.
I noticed that, in the controller, if I put for example:
[code]
<? php namespace App \ Controllers;
use App \ Models \ UserModel;

class Users extends BaseController
{
    public $ uModel;

    public function __construct ()
    {
        helper ('form');
        $ this-> uModel = new UserModel ();
    }


    public function index ()
    {
        $ data ['users'] = $ this-> uModel-> findAll ();
        return view ('crud / index', $ data);
    }
}

[/ code]

It tells me that the "users" variable is undefined.

It seems to conflict with what is written in 'routes', ($ data).

I have tested it on another without adminlte and it works.

attached the pastebin
https://pastebin.com/KRcsV48G
Reply


Messages In This Thread
[Solved] Problem with ci4-adminlte - by chiabgigi - 02-01-2021, 04:54 AM
RE: Problem with ci4-adminlte - by InsiteFX - 02-01-2021, 12:38 PM
RE: Problem with ci4-adminlte - by chiabgigi - 02-01-2021, 02:07 PM
RE: Problem with ci4-adminlte - by InsiteFX - 02-01-2021, 09:47 PM
RE: Problem with ci4-adminlte - by chiabgigi - 02-01-2021, 11:49 PM
RE: Problem with ci4-adminlte - by chiabgigi - 02-02-2021, 02:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB