Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Multiple primary keys for protected $primaryKey
Post: Multiple primary keys for protected $primaryKey

PHP Code: -- protected $primaryKey = 'priKey1'; // normal for a table having 1 pri key -- I have a combination of 3 pri key Then how should I declare it? PHP Code: -- protected $primaryKey = 'priK...
6,996 Views
8 Replies
10-05-2019, 09:56 AM
bustersg
    Thread: Call Model function from Controller
Post: Call Model function from Controller

While I know the concept of MVC but I am not sure if I am doing this the most 'efficient' way I have sql function in Model, I wan call it from Controller to pass it to View Below is how I do the 'fl...
5,371 Views
4 Replies
09-27-2019, 08:24 PM
bustersg
    Thread: CI4 and Bootstrap
Post: CI4 and Bootstrap

Is there any built in component for bootstrap 4 such that you can activate conveniently in ? Or is still same as CI3 where one has to create assets/css folders in folder public Code: --     --
5,664 Views
2 Replies
09-21-2019, 08:28 PM
bustersg
    Thread: How to load Configuration Files as Array?
Post: How to load Configuration Files as Array?

I am passing some environment settings to a view template but how do I pass it as an Array to avoid below error? TypeError Argument 2 passed to view() must be of the type array, object given P...
1,097 Views
1 Replies
09-18-2019, 09:16 AM
bustersg
    Thread: Best way to use db table prefix
Post: Best way to use db table prefix

So I include $db = ... in every functions and in each RAW $sql, I use $db->prefixTable('table_name') It works but is this the ideal way of coding it in CI4? PHP Code: -- function get_include_f...
2,961 Views
1 Replies
09-17-2019, 08:52 AM
bustersg
    Thread: Where to store common 'global' functions?
Post: RE: Where to store common 'global' functions?

kilishan Wrote: (09-16-2019, 11:34 AM) -- If you want them loaded all of the time, you can add them App/Common.php. If you want them to be available to load just when needed, treat them as a Help...
2,219 Views
3 Replies
09-16-2019, 11:59 AM
bustersg
    Thread: Where to store common 'global' functions?
Post: Where to store common 'global' functions?

I have a bunch of functions on common.php (no class just pure functions) Now migration to CI4 framework, where should I park this bunch of functions? Some or most functions does interact with database...
2,219 Views
3 Replies
09-16-2019, 10:04 AM
bustersg
    Thread: Model return Undefined variable: table
Post: Model return Undefined variable: table

I get ErrorException Undefined variable: table APPPATH/Models/OptionsModel.php at line 22 Code: -- 22: $option_value = $table->find($item); -- app/Models/OptionsModel.php Code: --
1,446 Views
1 Replies
09-15-2019, 08:50 AM
bustersg

Theme © iAndrew 2016 - Forum software by © MyBB