Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Form validation is_unique: valid if value is in current row, invalid on any other row
Post: RE: Form validation is_unique: valid if value is i...

iRedds Wrote: (01-24-2022, 08:41 AM) -- https://www.php.net/manual/en/language.oop5.properties.php " but this initialization must be a constant value." -- Thanks iRedds, I missed this one. I initiali...
957 Views
7 Replies
Yesterday, 01:31 AM
Zeff
    Thread: Form validation is_unique: valid if value is in current row, invalid on any other row
Post: RE: Form validation is_unique: valid if value is i...

Thanks for posting your solution BFlokstra! Are you validating in a config file or in the controller? I've been trying to solve the same issue in the 'In Model' validation (i.e. setting the model p...
957 Views
7 Replies
01-24-2022, 08:16 AM
Zeff
    Thread: RESTful resource handling and delete: controller method not found
Post: RE: RESTful resource handling and delete: controll...

xenomorph1030 Wrote: (01-19-2022, 06:55 AM) -- Are you using the proper HTTP verb when making the request? It looks like you need to use the DELETE verb to administration/user/1 Per the documentatio...
215 Views
4 Replies
01-19-2022, 08:03 AM
Zeff
    Thread: RESTful resource handling and delete: controller method not found
Post: RESTful resource handling and delete: controller m...

Hi all, I created a controller User in a subfolder ('administration'): App/Controllers/Administration/User.php Acording to https://codeigniter4.github.io/userguide/incoming/restful.html, I added a rou...
215 Views
4 Replies
01-19-2022, 06:23 AM
Zeff
    Thread: Get controller name and method
Post: RE: Get controller name and method

Thanks guys, Interesting! I searched the userguide for more info on this router service (and its methods), but I come home empty handed... Suggestions on where to find more? Cheers, Zeff
5,890 Views
5 Replies
06-04-2021, 06:36 AM
Zeff
  Sad Thread: How to extend the default model
Post: RE: How to extend the default model

Thanks InsiteFX! It's that simple... I still have to get used to the new way of coding in CI4. I've shared my code for my 'BaseModel' in App\Models, maybe I can be helpfull for others... PHP C...
392 Views
2 Replies
05-27-2021, 01:55 AM
Zeff
    Thread: How to extend the default model
Post: How to extend the default model

Hi friends, For a specific App, I want to add some extra functionality (a createDropdown() method) to the default model (System\Model - which extends the BaseModel in the same location) so I can us...
392 Views
2 Replies
05-27-2021, 12:04 AM
Zeff
    Thread: DB Forge: possibility to change / set a primary key on a field of an existing table?
Post: DB Forge: possibility to change / set a primary ke...

Hi all, I was reading the user guide on the CI4 Database Forge class. I want to set a primary key on an field of an (existing) table.  The addPrimaryKey() should be use on fields that must be c...
391 Views
1 Replies
05-06-2021, 05:16 AM
Zeff
    Thread: Trouble with view_cell
Post: RE: Trouble with view_cell

Hello iRedds, Thanks so much for your hint, it worked by returning a string. I was so used to echo views from the previous tutorials I followed and I missed this perticular difference... You made my...
484 Views
2 Replies
05-06-2021, 12:38 AM
Zeff
    Thread: Trouble with view_cell
Post: Trouble with view_cell

Hi folks, I tried to use the view_cell() function in a view file, but I always get an error:  Code: -- TypeError Return value of CodeIgniter\View\Cell::render() must be of the type string, null ...
484 Views
2 Replies
05-05-2021, 07:25 AM
Zeff
    Thread: Using and namespacing 'modules'
Post: Using and namespacing 'modules'

UPDATE - 2020-04-20 I changed App\Config\Autoload.php to: PHP Code: --
662 Views
0 Replies
04-16-2020, 06:01 AM
Zeff
    Thread: CI3 and HMVC: fetch_module() issue
Post: CI3 and HMVC: fetch_module() issue

Hi all, In a CI HMVC project, I created a module for managing navigation and breadcrumbs of the site. In each module (take the example 'Start' module), I try to load the 'custom' menu and breadcru...
686 Views
0 Replies
04-01-2020, 03:29 AM
Zeff
    Thread: Question mark problem
Post: RE: Question mark problem

Hi Theedo, A question mark is reserved for use in query strings: Typical URL containing a query string is as follows: http://example.com/search?name=ferret CI always uses: http://example.com/ind...
3,460 Views
5 Replies
03-15-2018, 09:20 AM
Zeff
    Thread: Use anything as a rule and $this->some_model issue
Post: RE: Use anything as a rule and $this->some_model i...

Of course... I was dull searching for an explanation, I missed that one. Many thanks jreklund!
5,084 Views
8 Replies
02-02-2018, 06:51 AM
Zeff
    Thread: Use anything as a rule and $this->some_model issue
Post: RE: Use anything as a rule and $this->some_model i...

UPDATE: I tested again an it seems to be working perfectly if you call a validation array too. :@  The only difference with my live example (which throws 'T_VARIABLE' parse error on $this) is that...
5,084 Views
8 Replies
02-02-2018, 05:40 AM
Zeff
    Thread: How to pass a param when using a model method as callable using form validation lib?
Post: RE: How to pass a param when using a model method ...

Problem starts if you create a config or validation array like: PHP Code: -- $validation_rules = array(  array(    'field' => 'some field',    'label' => 'Some Field',    'rules' => array( '...
3,415 Views
7 Replies
02-01-2018, 09:22 AM
Zeff
    Thread: How to pass a param when using a model method as callable using form validation lib?
Post: RE: How to pass a param when using a model method ...

Thanks, I'm on 3.1.7...
3,415 Views
7 Replies
02-01-2018, 08:28 AM
Zeff
    Thread: How to pass a param when using a model method as callable using form validation lib?
Post: RE: How to pass a param when using a model method ...

Hello happyape, I'm getting the same error. I saw your thread stayed unsolved, were you able to fix it? Please let me know! Zeff
3,415 Views
7 Replies
02-01-2018, 08:08 AM
Zeff
    Thread: Access to model functions throught custom library
Post: RE: Access to model functions throught custom libr...

Hi LEBOSS, You should indeed call the code igniter instance 'by reference': assigning by reference allows you to use the original Code Igniter object rather than creating a copy of it. Read more ab...
4,346 Views
5 Replies
02-01-2018, 04:37 AM
Zeff
    Thread: Form Validation - Callback to a Model?
Post: RE: Form Validation - Callback to a Model?

minsk832 Wrote: (02-01-2018, 12:56 AM) -- Hello, my User_model have a public method called is_unique_email($email). This method checks if a user has a uniqe mail adress with some status flag checks....
4,582 Views
3 Replies
02-01-2018, 04:26 AM
Zeff

Theme © iAndrew 2016 - Forum software by © MyBB