• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
autoload

#1
i am playing with CI4 as well, and also developing in CI3. 

In ci4, there is the application/controllers/X.php where i can define controller and call http://localhost/class/method/ and it works fine. 

now what I did is in the same folder where application lives, i created my folder called admin0 


admin0
- Controllers
   - User.php 
- Models
- Views

- applicaiton 
- public 
- system 
- tests
- user_guide_src
- writable 


This is what User.php has: 

<?php namespace admin0\User;

class User extends \CodeIgniter\Controller
{
    public function ping()
    {
        echo "PONG PONG PONG !!!";
    }
}


-- No matter what i tried, I could not make  http://localhost/user/ping work :Sad

how do someone loads this psr4 in CI4  - in the above structure ? 



Thanks,
Reply


Messages In This Thread
autoload - by admin0 - 06-19-2018, 07:46 AM
RE: autoload - by admin0 - 06-19-2018, 08:02 AM
RE: autoload - by Nome - 06-21-2018, 12:01 AM
RE: autoload - by InsiteFX - 06-21-2018, 03:05 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.