Moving to ci4 |
It has been a number of years but I am ready to move my app from ci3 to ci4. I realize this will be a rewrite.
But first I need to learn ci4. Can anyone recommend a way to learn CI4? Is reading the documentation the way to go?
proof that an old dog can learn new tricks
Thx. Can you point at an example? I already know php slightly. What is namespace priority? Where can I review that? What documentation are you referring to?
proof that an old dog can learn new tricks
Yes, first of all, everyone should learn modern PHP, especially namespaces and autoloading (PSR-4).
https://phptherightway.com/#namespaces https://leanpub.com/codeigniter4foundations "Primer: Namespaces" https://www.php-fig.org/psr/psr-4/ And it is better to learn Composer. https://phptherightway.com/#composer_and_packagist Next read the upgrade guide. https://codeigniter4.github.io/CodeIgnit...e_4xx.html "CodeIgniter 3 to 4 Upgrade Helper" might help you. https://github.com/kenjis/ci3-to-4-upgra...per#readme
Read the CodeIgniter Documentation also.
IncludeBeer - CodeIgniter 4 Tutorials. Search Google for other Tutorials. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thanks. With some help I managed to get ci4 and a debugger running under phpstorm. I am going to try to roughly get my ci3 app running under ci4. My app uses GroceryCrud heavily.
My main controller called Configure.php starts with __construct() where I load up a few helpers and libraries, get the results of authentication from Okta, run _init() which set up session variables and finally index(). My question is where do I do the initialization/sessionSetup/authetication now? Do I do this in the BaseController? (06-20-2023, 03:20 PM)richb201 Wrote: Thanks. With some help I managed to get ci4 and a debugger running under phpstorm. I am going to try to roughly get my ci3 app running under ci4. My app uses GroceryCrud heavily.
proof that an old dog can learn new tricks
Yes the BaseController is where I setup my Sessions.
PHP Code: <?php What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thanks Insite. It has been awhile. I am trying to setup BaseController. I am on the helpers section:
protected $helpers = []; So I tried this: helper(array('form', 'url', 'file', 'array', 'download', 'directory', 'cookie','date')); I want to get started on the "right foot". Docs show: helper('array'); Is that not what I am doing?
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |