Search code examples
codeignitervisual-studio-codecodeigniter-4

CodeIgniter 4 Vendor not detected when calling


image show that it cannot find it

I don't know what I've been doing, maybe I accidentally change the CI4 configuration.

So, I'm installing "hermawan/codeigniter4-datatables" with Composer and it successfully installed. Then, when i call it inside Controller, it seems like ci4 can't find it. I'm using VS-Code, so when I type use Hermawan\DataTables\DataTable, I cannot ctrl + left click.

When I use another project (past), its normal. But in this project is not.


Solution

  • Check whether you've imported the library or autoloaded the library.

    use \Hermawan\DataTables\DataTable;
    

    as well this need php-sql-parser


    If above all done n still running errors, use

    composer dump-autoload