C_I 4.1.8 M odule - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3) +--- Thread: C_I 4.1.8 M odule (/showthread.php?tid=81211) |
C_I 4.1.8 M odule - luckmoshy - 02-04-2022 hi guys, I have C_i 4,1,8 with several post-modules in autoloader = Code: public $psr4 = [ why model work only if PHP Code: <?php echo form_open_multipart()? /*Here works and I don't know how does it detect its controller and method here */> but if I post the form with the controller and method does not work in the module like: PHP Code: <?PHP echo form_open_multipart('create/post') /*Here does not work and this way was doing in past c_i 4 and it was working fine*/?> it shows 404 error All in all, I want to have assurance if it is ok for that or is it wrong and how c_i 4.1.8 detects those routes, controllers, and their method? RE: C_I 4.1.8 M odule - sprhld - 02-04-2022 Hi! If you are use form_open() you use the same controller and method which creates the page. The 404-error in your other example suggests, that the create-Controller was not found. Do you have a create.php in you controller directory? RE: C_I 4.1.8 M odule - luckmoshy - 02-04-2022 (02-04-2022, 11:31 AM)sprhld Wrote: Hi! No in my controller it is normal PHP Code: public function post(){return view('create');} the thing which I do not understand is that there are about six forms and all work without any form parameter PHP Code: <?PHP echo form_open()?> PHP Code: <?PHP echo form_open('create/post')?> PHP Code: create RE: C_I 4.1.8 M odule - luckmoshy - 02-04-2022 (02-04-2022, 06:43 AM)luckmoshy Wrote: hi guys, I have C_i 4,1,8 with several post-modules in autoloader = Thank you guys after long searching I have come up with an answer in C_I 4 outside module should be qualified with a complete namespace otherwise can not work PHP Code: <?php echo form_open(route_to('\Admin\Controllers\create'))?> RE: C_I 4.1.8 M odule - InsiteFX - 02-05-2022 Please edit your post and add [SOLVED] to your post title. Thank you. RE: C_I 4.1.8 M odule - sprhld - 02-05-2022 And this can also be the url for form (/admin/controllers/create). Or something like that ;-) |