backend-codeigniter-routing

star 1

Route configuration, RESTful routes, URL structure.

valec3 By valec3 schedule Updated 2/2/2026

name: backend-codeigniter-routing description: Route configuration, RESTful routes, URL structure.

Backend CodeIgniter Routing

When to use this skill

  • Defining routes
  • RESTful URLs
  • Route groups
  • API versioning

Workflow

  • Define in Config/Routes.php
  • Use resource routes for REST
  • Group related routes
  • Version APIs
  • Use route filters

Instructions

RESTful Routes

<?php

// Config/Routes.php
$routes->resource('users', ['controller' => 'UserController']);
// GET    /users
// GET    /users/:id
// POST   /users
// PUT    /users/:id
// DELETE /users/:id

API Versioning

<?php

$routes->group('api/v1', ['namespace' => 'App\Controllers\API\V1'], function($routes) {
    $routes->resource('users');
    $routes->resource('orders');
});

Route Filters

<?php

$routes->group('api', ['filter' => 'auth'], function($routes) {
    $routes->get('profile', 'UserController::profile');
});

Resources

  • Use resource() for RESTful routes
  • Group and version APIs
  • Apply filters for middleware
Install via CLI
npx skills add https://github.com/valec3/Agents.skills.md --skill backend-codeigniter-routing
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator