• 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extend CI model to allow params to be passed to the constructor?

#4
That would require you to update the system/model and that is not recommended you should
never change a system file.

You could extended say the BaseModel, setup your Constructor and then extend all your models
form the BaseModel. In the BaseModel do not use the parent__construct() only in the model that
you extend from the BaseModel.

BaseModel extends Model

All your Models extend BaseModel
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Extend CI model to allow params to be passed to the constructor? - by InsiteFX - 09-13-2020, 08:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.