Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →MVC pattern in CodeIgniter, separation of concerns.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -20% | 0% |
php<?php namespace App\Controllers; use App\Services\UserService; class UserController extends BaseController { public function __construct( private readonly UserService $service ) {} public function index() { $users = $this->service->getAllUsers(); return view('users/index', ['users' => $users]); } public function store() { $user = $this->service->createUser($this->request->getPost()); return $this->respond($user); } }
php<?php namespace App\Models; use CodeIgniter\Model; class UserModel extends Model { protected $table = 'users'; protected $allowedFields = ['name', 'email']; protected $returnType = 'App\Entities\User'; }
php<?php namespace App\Services; class UserService { public function __construct( private UserModel $model ) {} public function getAllUsers() { return $this->model->findAll(); } }
Other measured skills in the registry, with their headline benchmark lift.