0

What is GoBaseController and why does CI Wiz use it?

The generated code references GoBaseController everywhere. What is it, what does it provide, and should I extend it in my own custom controllers?
Asked by Unknown Jan 27, 2026 99 views

1 Answer

0
✓ Accepted
`GoBaseController` is an abstract controller class that CI Wiz generates once per project. All generated controllers extend it rather than extending CI4's `BaseController` directly. It centralizes logic that would otherwise be copy-pasted into every controller: shared `$viewData` initialization, common validation helpers, the `displayForm()` method (which may be deprecated in a future release), and utility wrappers around session and response handling. You can and should extend it for your own custom controllers too — it gives you the same baseline as the generated ones. If CI Wiz regenerates `GoBaseController.php`, any modifications you made to it would be overwritten, so keep your customizations in subclasses rather than editing the base directly.
Answered by cantonner Jan 27, 2026

Please sign in to post an answer. sign in