Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Potential Bug Report: Presenter::show(id) Overwrites Custom Functions
Post: RE: Potential Bug Report: Presenter::show(id) Over...

kenjis Wrote: (06-12-2024, 02:47 AM) -- Define the routes for the custom functions before calling the `$routes->presenter('example', ...)`. -- Thanks. Feeling stupid that I didn't move it :)
681 Views
2 Replies
06-12-2024, 03:41 AM
MZahov
    Thread: Potential Bug Report: Presenter::show(id) Overwrites Custom Functions
Post: Potential Bug Report: Presenter::show(id) Overwrit...

When using CodeIgniter 4, the Presenter show(id) method appears to overwrite custom functions that I have added. This results in a 404 error when trying to access these functions, with the message: ...
681 Views
2 Replies
06-12-2024, 01:48 AM
MZahov
    Thread: Codeigniter 4 Model set() returns error
Post: RE: Codeigniter 4 Model set() returns error

For other people who encounter use of OBJECT in update() function based on foreign key. Solution/Transform object to array and use set($array):  PHP Code: -- model()->where('foreign', $foreign)...
1,846 Views
7 Replies
03-28-2024, 02:22 AM
MZahov
    Thread: Codeigniter 4 Model set() returns error
Post: RE: Codeigniter 4 Model set() returns error

kenjis Wrote: (03-28-2024, 12:58 AM) -- As you see the first parameter of set() method is: PHP Code: -- @param array|object|string              $key    Field name, or an array of field/value pair...
1,846 Views
7 Replies
03-28-2024, 01:51 AM
MZahov
    Thread: Codeigniter 4 Model set() returns error
Post: RE: Codeigniter 4 Model set() returns error

If I use array not entity it works fine. This function is inside "vendor\codeigniter4\framework\system\Model.php" PHP Code: --     /**     * Captures the builder's set() method so that we can valid...
1,846 Views
7 Replies
03-27-2024, 11:22 PM
MZahov
    Thread: Codeigniter 4 Model set() returns error
Post: Codeigniter 4 Model set() returns error

Input: Entity Object  Error returned: "Illegal offset type" on line 685 in \codeigniter4\framework\system\Model.php. Example: PHP Code: --         if ((new EquipmentModel)->where('order_id', $or...
1,846 Views
7 Replies
03-27-2024, 05:52 AM
MZahov
    Thread: Using of redirect returns no RedirectResponse
Post: RE: Using of redirect returns no RedirectResponse

It seems like you haven't provided enough information to pinpoint the issue. Make sure you have the correct namespace and if you are not extending BaseController also check this link (https://codeigni...
537 Views
1 Replies
02-29-2024, 09:23 AM
MZahov
    Thread: Validation doesn't work
Post: RE: Validation doesn't work

If your validation fail and you want to return view with errors it will be better to use  PHP Code: -- // Controller:            if (!$this->validate([    'judul' => 'required|is_unique[comic...
1,157 Views
3 Replies
02-27-2024, 10:36 PM
MZahov
    Thread: Validating a 2D array in Codeigniter > v4.4.4
Post: Validating a 2D array in Codeigniter > v4.4.4

Hi everyone,  I'm currently working on a project using Codeigniter 4.4.6, and I'm facing a challenge with validating a 2D array. I want to ensure that the array meets certain criteria and rules, bu...
352 Views
0 Replies
02-27-2024, 06:49 AM
MZahov

Theme © iAndrew 2016 - Forum software by © MyBB