{"id":368,"date":"2025-02-20T15:00:01","date_gmt":"2025-02-20T08:00:01","guid":{"rendered":"https:\/\/tikky.xyz\/blog\/?p=368"},"modified":"2025-05-23T11:19:28","modified_gmt":"2025-05-23T04:19:28","slug":"codeigniter-%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a-auto-routing","status":"publish","type":"post","link":"https:\/\/tikky.xyz\/blog\/?p=368","title":{"rendered":"CodeIgniter \u0e41\u0e25\u0e30\u0e23\u0e30\u0e1a\u0e1a Auto Routing"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">CodeIgniter \u0e04\u0e37\u0e2d\u0e2d\u0e30\u0e44\u0e23?<\/h2>\n\n\n\n<p>CodeIgniter (CI) \u0e40\u0e1b\u0e47\u0e19 PHP Framework \u0e17\u0e35\u0e48\u0e21\u0e35\u0e02\u0e19\u0e32\u0e14\u0e40\u0e1a\u0e32 \u0e23\u0e27\u0e14\u0e40\u0e23\u0e47\u0e27 \u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e07\u0e48\u0e32\u0e22 \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a MVC (Model-View-Controller) \u0e43\u0e19\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32 \u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e17\u0e31\u0e49\u0e07\u0e02\u0e19\u0e32\u0e14\u0e40\u0e25\u0e47\u0e01\u0e41\u0e25\u0e30\u0e02\u0e19\u0e32\u0e14\u0e01\u0e25\u0e32\u0e07<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 CodeIgniter<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u0e43\u0e0a\u0e49 Composer\ncomposer create-project codeigniter4\/appstarter project-name\n\n# \u0e2b\u0e23\u0e37\u0e2d\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14\u0e08\u0e32\u0e01 website\n# https:\/\/codeigniter.com\/download<\/pre>\n\n\n\n<p><strong>\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">project\/\n\u251c\u2500\u2500 app\/\n\u2502   \u251c\u2500\u2500 Config\/\n\u2502   \u251c\u2500\u2500 Controllers\/\n\u2502   \u251c\u2500\u2500 Models\/\n\u2502   \u2514\u2500\u2500 Views\/\n\u251c\u2500\u2500 public\/\n\u251c\u2500\u2500 system\/\n\u2514\u2500\u2500 writable\/<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Auto Routing \u0e43\u0e19 CodeIgniter 4<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Auto Routing Legacy (\u0e41\u0e1a\u0e1a\u0e40\u0e14\u0e34\u0e21)<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Config\/Routes.php\n$routes->setAutoRoute(true);<\/pre>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07 Auto Routing \u0e41\u0e1a\u0e1a\u0e40\u0e14\u0e34\u0e21:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">URL: example.com\/products\/show\/123\n\n\u0e08\u0e30\u0e16\u0e39\u0e01\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19:\nController: Products\nMethod: show\nParameter: 123<\/pre>\n\n\n\n<p><strong>2. Auto Routing Improved (\u0e41\u0e1a\u0e1a\u0e43\u0e2b\u0e21\u0e48\u0e43\u0e19 CI4)<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Config\/Routing.php\npublic bool $autoRoute = true;<\/pre>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 Controller:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Controllers\/Blog.php\nnamespace App\\Controllers;\n\nclass Blog extends BaseController\n{\n    public function index()\n    {\n        return view('blog\/list');\n    }\n\n    public function show($id)\n    {\n        return view('blog\/detail', ['id' => $id]);\n    }\n\n    public function category($type, $id)\n    {\n        return \"Category: $type, ID: $id\";\n    }\n}<\/pre>\n\n\n\n<p>\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a URL \u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e07\u0e32\u0e19:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/blog            -> Blog::index()\n\/blog\/show\/123   -> Blog::show(123)\n\/blog\/category\/news\/5  -> Blog::category('news', 5)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14 Routes \u0e41\u0e1a\u0e1a Manual<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Routes \u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Config\/Routes.php\n$routes->get('\/', 'Home::index');\n$routes->get('blog', 'Blog::index');\n$routes->get('blog\/(:num)', 'Blog::show\/$1');\n$routes->post('blog\/create', 'Blog::create');<\/pre>\n\n\n\n<p><strong>2. Routes \u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e40\u0e07\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e02<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ Routes with constraints\n$routes->get('users\/(:num)', 'Users::show\/$1');\n$routes->get('blog\/(:alpha)', 'Blog::category\/$1');\n$routes->get('posts\/(:segment)', 'Posts::view\/$1');<\/pre>\n\n\n\n<p><strong>3. Routes Groups<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$routes->group('admin', ['filter' => 'auth'], function($routes) {\n    $routes->get('users', 'Admin\\Users::index');\n    $routes->get('posts', 'Admin\\Posts::index');\n    $routes->get('settings', 'Admin\\Settings::index');\n});<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Controller \u0e01\u0e31\u0e1a Auto Routing<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Controller \u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">namespace App\\Controllers;\n\nclass Product extends BaseController\n{\n    public function index()\n    {\n        \/\/ \u0e41\u0e2a\u0e14\u0e07\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\n        return view('products\/list');\n    }\n\n    public function show($id)\n    {\n        \/\/ \u0e41\u0e2a\u0e14\u0e07\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\n        $model = new \\App\\Models\\ProductModel();\n        $data['product'] = $model->find($id);\n        return view('products\/detail', $data);\n    }\n\n    public function create()\n    {\n        \/\/ \u0e41\u0e2a\u0e14\u0e07\u0e1f\u0e2d\u0e23\u0e4c\u0e21\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\n        return view('products\/create');\n    }\n\n    public function store()\n    {\n        \/\/ \u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\n        $model = new \\App\\Models\\ProductModel();\n        $data = $this->request->getPost();\n        \n        if ($model->save($data)) {\n            return redirect()->to('\/products');\n        }\n    }\n}<\/pre>\n\n\n\n<p><strong>2. \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 Filters \u0e01\u0e31\u0e1a Auto Routing<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Filters\/AuthFilter.php\nnamespace App\\Filters;\n\nuse CodeIgniter\\HTTP\\RequestInterface;\nuse CodeIgniter\\HTTP\\ResponseInterface;\nuse CodeIgniter\\Filters\\FilterInterface;\n\nclass AuthFilter implements FilterInterface\n{\n    public function before(RequestInterface $request, $arguments = null)\n    {\n        if (!session()->get('logged_in')) {\n            return redirect()->to('\/login');\n        }\n    }\n\n    public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)\n    {\n        \/\/ \u0e17\u0e33\u0e07\u0e32\u0e19\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 controller \u0e17\u0e33\u0e07\u0e32\u0e19\u0e40\u0e2a\u0e23\u0e47\u0e08\n    }\n}<\/pre>\n\n\n\n<p><strong>3. \u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14 Filters \u0e43\u0e19 Routes<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ app\/Config\/Filters.php\npublic $filters = [\n    'auth' => \\App\\Filters\\AuthFilter::class\n];\n\n\/\/ app\/Config\/Routes.php\n$routes->get('admin\/*', 'Admin\\Dashboard::index', ['filter' => 'auth']);<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e23\u0e23\u0e30\u0e27\u0e31\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 Auto Routing<\/h2>\n\n\n\n<ol>\n<li><strong>\u0e04\u0e27\u0e32\u0e21\u0e1b\u0e25\u0e2d\u0e14\u0e20\u0e31\u0e22<\/strong><\/li>\n<\/ol>\n\n\n\n<ul>\n<li>Auto routing \u0e2d\u0e32\u0e08\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 methods \u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e44\u0e14\u0e49<\/li>\n\n\n\n<li>\u0e04\u0e27\u0e23\u0e43\u0e0a\u0e49 filters \u0e2b\u0e23\u0e37\u0e2d access controls \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19<\/li>\n<\/ul>\n\n\n\n<ol start=\"2\">\n<li><strong>\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d Method<\/strong><\/li>\n<\/ol>\n\n\n\n<ul>\n<li>Methods \u0e17\u0e35\u0e48\u0e02\u0e36\u0e49\u0e19\u0e15\u0e49\u0e19\u0e14\u0e49\u0e27\u0e22 underscore (_) \u0e08\u0e30\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e1c\u0e48\u0e32\u0e19 URL \u0e44\u0e14\u0e49<\/li>\n\n\n\n<li>\u0e04\u0e27\u0e23\u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a private methods<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\">\n<li><strong>Performance<\/strong><\/li>\n<\/ol>\n\n\n\n<ul>\n<li>Auto routing \u0e15\u0e49\u0e2d\u0e07\u0e04\u0e49\u0e19\u0e2b\u0e32 controller \u0e41\u0e25\u0e30 method \u0e15\u0e32\u0e21 URL<\/li>\n\n\n\n<li>\u0e2d\u0e32\u0e08\u0e0a\u0e49\u0e32\u0e01\u0e27\u0e48\u0e32\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14 routes \u0e41\u0e1a\u0e1a manual \u0e40\u0e25\u0e47\u0e01\u0e19\u0e49\u0e2d\u0e22<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e41\u0e19\u0e27\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e17\u0e35\u0e48\u0e41\u0e19\u0e30\u0e19\u0e33<\/h2>\n\n\n\n<ol>\n<li><strong>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e02\u0e19\u0e32\u0e14\u0e40\u0e25\u0e47\u0e01<\/strong><\/li>\n<\/ol>\n\n\n\n<ul>\n<li>\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49 Auto Routing \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e30\u0e14\u0e27\u0e01<\/li>\n\n\n\n<li>\u0e43\u0e0a\u0e49 filters \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07<\/li>\n<\/ul>\n\n\n\n<ol start=\"2\">\n<li><strong>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e02\u0e19\u0e32\u0e14\u0e43\u0e2b\u0e0d\u0e48<\/strong><\/li>\n<\/ol>\n\n\n\n<ul>\n<li>\u0e1b\u0e34\u0e14 Auto Routing<\/li>\n\n\n\n<li>\u0e01\u0e33\u0e2b\u0e19\u0e14 Routes \u0e41\u0e1a\u0e1a manual<\/li>\n\n\n\n<li>\u0e43\u0e0a\u0e49 Route Groups \u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 URLs<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\">\n<li><strong>\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 Security<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 private methods\nclass Blog extends BaseController\n{\n    private function _updateStats()\n    {\n        \/\/ method \u0e19\u0e35\u0e49\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e1c\u0e48\u0e32\u0e19 URL \u0e44\u0e14\u0e49\n    }\n}\n\n\/\/ \u0e43\u0e0a\u0e49 filters \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\n$routes->get('admin\/*', 'Admin\\Dashboard::index', ['filter' => 'auth']);<\/pre>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_368\" class=\"pvc_stats all  \" data-element-id=\"368\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/tikky.xyz\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>CodeIgniter \u0e04\u0e37\u0e2d\u0e2d\u0e30\u0e44\u0e23? CodeIgniter (CI) \u0e40\u0e1b\u0e47\u0e19 PHP Framework \u0e17\u0e35\u0e48\u0e21\u0e35\u0e02\u0e19\u0e32\u0e14\u0e40\u0e1a\u0e32 \u0e23\u0e27\u0e14\u0e40\u0e23\u0e47\u0e27 \u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e07\u0e48\u0e32\u0e22 \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a MVC (Model-View-Controller) \u0e43\u0e19\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32 \u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e17\u0e31\u0e49\u0e07\u0e02\u0e19\u0e32\u0e14\u0e40\u0e25\u0e47\u0e01\u0e41\u0e25\u0e30\u0e02\u0e19\u0e32\u0e14\u0e01\u0e25\u0e32\u0e07 \u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 CodeIgniter \u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e42\u0e1f\u0e25\u0e40\u0e14\u0e2d\u0e23\u0e4c\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19 Auto Routing \u0e43\u0e19 CodeIgniter 4 1. Auto Routing Legacy (\u0e41\u0e1a\u0e1a\u0e40\u0e14\u0e34\u0e21) \u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07 Auto Routing \u0e41\u0e1a\u0e1a\u0e40\u0e14\u0e34\u0e21: 2. Auto Routing Improved (\u0e41\u0e1a\u0e1a\u0e43\u0e2b\u0e21\u0e48\u0e43\u0e19 CI4) \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 Controller: \u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a URL \u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e07\u0e32\u0e19: \u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14 Routes \u0e41\u0e1a\u0e1a Manual 1. Routes \u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19 2. Routes \u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e40\u0e07\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e02 3. Routes [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_368\" class=\"pvc_stats all  \" data-element-id=\"368\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/tikky.xyz\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":369,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,21,11],"tags":[],"_links":{"self":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368"}],"collection":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368"}],"version-history":[{"count":1,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":370,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/368\/revisions\/370"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/media\/369"}],"wp:attachment":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}