Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 4.2
#19

(06-04-2022, 05:01 AM)seighth Wrote: I built my site around the idea of easily finding the controller method just by looking at the url. Now it is all thrown out the window and I have to route literally "Hundreds" of ajax and form urls and also rename probably close to a hundred methods with "get,post,put, etc.." parameters... I feel betrayed.... is there a way to make the old way work in version 4.2.1? because I am already dying trying to maintain a fully featured social networking site and then these drastic changes happen.... do you guys hate me.. I love CI but.... T_T

I was in a similar situation as yourself... a fairly large app with a couple hundred routes. 

To ease the pain of creating all the routes I have been using kenjis/ci4-attribute-routes (https://github.com/kenjis/ci4-attribute-routes)

It allows you to generate a routes file based on attributes you place above each controller method.

I go through every controller/method and add the routes attribute and run a simple spark command (php spark route:update)... voila instant routes!

If you create a few snippets in your ide to generate route attributes code, you can plow through several hundred in short order.

In the future I'll be using kenjis/ci4-attribute-routes in all new projects. Simply put, it's a brilliant tool that just makes sense (for myself at least) to use all the time.

Big thank you to kenjis Smile
Reply


Messages In This Thread
CodeIgniter 4.2 - by MGatner - 06-03-2022, 09:12 AM
RE: CodeIgniter 4.2 - by kilishan - 06-03-2022, 10:12 AM
RE: CodeIgniter 4.2 - by datamweb - 06-03-2022, 11:41 AM
RE: CodeIgniter 4.2 - by trebor - 06-03-2022, 11:53 AM
RE: CodeIgniter 4.2 - by seunex - 06-03-2022, 02:29 PM
RE: CodeIgniter 4.2 - by InsiteFX - 06-03-2022, 11:35 PM
RE: CodeIgniter 4.2 - by seighth - 06-04-2022, 05:01 AM
RE: CodeIgniter 4.2 - by kenjis - 06-04-2022, 03:17 PM
RE: CodeIgniter 4.2 - by plaztic - 07-06-2022, 12:26 PM
RE: CodeIgniter 4.2 - by manager - 06-04-2022, 08:07 AM
RE: CodeIgniter 4.2 - by hamransp - 06-04-2022, 08:27 AM
RE: CodeIgniter 4.2 - by kenjis - 06-04-2022, 04:37 PM
RE: CodeIgniter 4.2 - by nc03061981 - 06-04-2022, 08:33 PM
RE: CodeIgniter 4.2 - by php_rocs - 06-06-2022, 07:18 AM
RE: CodeIgniter 4.2 - by namthanh - 06-06-2022, 09:22 PM
RE: CodeIgniter 4.2 - by luckmoshy - 06-07-2022, 01:14 AM
RE: CodeIgniter 4.2 - by tgix - 06-07-2022, 10:37 PM
RE: CodeIgniter 4.2 - by intvictor - 07-02-2022, 09:09 AM
RE: CodeIgniter 4.2 - by lokman - 07-03-2022, 09:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB