Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Model within a model
Post: RE: Model within a model

Okay. It looks like that this is not an option what I'm asking. But how about I include the model every time there is a new function inside a model? Is this oke or will it also eventually give a memor...
3,971 Views
12 Replies
07-01-2021, 05:02 AM
LuxesR
    Thread: Model within a model
Post: RE: Model within a model

paulbalandan Wrote: (06-30-2021, 07:07 PM) -- By any chance, why do you need an instance of Users model inside Settings model, and vice versa? -- Because in some functions of the Settings_model I n...
3,971 Views
12 Replies
07-01-2021, 02:58 AM
LuxesR
    Thread: Model within a model
Post: RE: Model within a model

Thanks for your responses. What InsiteFX suggested was my first idea but I had the same problem with that. I'm using it like this (just like the Settings_model): PHP Code: -- namespace App\Model...
3,971 Views
12 Replies
06-30-2021, 02:49 AM
LuxesR
    Thread: Model within a model
Post: RE: Model within a model

Thanks for your response. But can I call the LoggingModel in the UserModel the same way?
3,971 Views
12 Replies
06-29-2021, 01:47 PM
LuxesR
    Thread: How to use $request->uri->getSegment() inside view?
Post: RE: How to use $request->uri->getSegment() inside...

0x0undefined Wrote: (06-20-2020, 11:02 AM) -- I'm trying to use `$ request-> uri-> getSegment (1)` in the view but I get an error saying "Undefined variable: request", what should I do to display a g...
5,737 Views
5 Replies
06-29-2021, 12:42 PM
LuxesR
    Thread: Model within a model
Post: Model within a model

Is it possible to include a model in the '__construct' and do the same with the other model? PHP Code: -- class Users_model extends \App\Models\BaseModel {     function __construct()     { ...
3,971 Views
12 Replies
06-29-2021, 12:31 PM
LuxesR
    Thread: Autoload for models like BaseController
Post: RE: Autoload for models like BaseController

As for the BaseModel.php. Find it out later. The BaseModel should look like this: PHP Code: -- namespace App\Models; use CodeIgniter\Model; class BaseModel extends Model { function __c...
2,982 Views
5 Replies
06-22-2021, 05:55 AM
LuxesR
    Thread: Autoload for models like BaseController
Post: RE: Autoload for models like BaseController

includebeer Wrote: (06-19-2021, 09:40 AM) -- You can create a base model and extend your other model on it. -- Thanks for you reply. I didn't know that you can make a base model. What is the conten...
2,982 Views
5 Replies
06-19-2021, 12:17 PM
LuxesR
    Thread: Autoload for models like BaseController
Post: Autoload for models like BaseController

So I'm working on CodeIgniter 4 lately and I'm trying to put my code from my CodeIgniter 3 project to CodeIgniter 4. Which isn't very easy. I want to use CodeIgniter 4 the best way possible, which is ...
2,982 Views
5 Replies
06-19-2021, 08:35 AM
LuxesR
    Thread: Include model inside a model
Post: RE: Include model inside a model

MGatner Wrote: (06-19-2021, 06:12 AM) -- Conceptually that should work fine! I believe your actual error is hiding because you are in a production instance. Try checking your error logs or switching ...
1,690 Views
3 Replies
06-19-2021, 06:45 AM
LuxesR
    Thread: Include model inside a model
Post: Include model inside a model

Hello! We are finally ready to use CodeIgniter 4. I only have some problems with using a model inside a model. I was expecting that I could use something like this: PHP Code: -- namespace App\Mode...
1,690 Views
3 Replies
06-18-2021, 12:13 AM
LuxesR

Theme © iAndrew 2016 - Forum software by © MyBB