CI4 Beta 1: function _remap not works properly |
my english is not the best.
in Codeigniter 3 I do: URL: /test/parameter1/parameter2/<parameterN> CI3 called class: Test called method: _remap (I have it function declared). in Codeigniter 3 all works ok. but in Codeigniter 4, with URL: /test CI4 call method _remap, woks ok. but with URL: /test/parameter1 or URL /test/parameter1/parameter2/<parameterN> show error: ReflectionException "Method App\Controllers\Test::parameter1() does not exist" ----- Details: - No setting route additional. - I try wihtout function index, but it does not affect. PHP Code: <?php namespace App\Controllers; excuse my english, I appreciate the help. thanks!!
I'm having the same issue.
My approach is to "fool" it by placing a dummy function if I'm not messing with Route Code: public function parameter1() Anyone has a better idea? (03-25-2019, 10:12 PM)hlmqz Wrote: my english is not the best.
See https://github.com/codeigniter4/CodeIgni...ssues/1928
Your controllers are supposed to have an index() method.
Thanks for the speedy reply. Actually, I do have an index() method
So, I just pulled down CI 4.0.0-rc.1 This is my code Code: <?php namespace App\Controllers; Anything else I've missed? THanks! jUstin
Hi Here,
I thought about that, but the error I'm getting is not the 404, but the one shared by the original author of this post. Let me simplify my example to make it more straight forward. Code: <?php namespace App\Controllers; And I tried to access a method that is not there, i.e. /home/go. The _remap should kick in and call $this->go_back() But, that's not happening... |
Welcome Guest, Not a member yet? Register Sign In |