📜  未捕获的类型错误:call_user_func():参数 #1 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:24.048000             🧑  作者: Mango

代码示例1
// add static to the functions in your controller file like "ProductController.php" or whatever and it should work 

// like if your code looks like that:

class ProductController {

   public function index() {

       echo 'index page';

   }

}

// it should be like that:

class ProductController {

   public static function index() {

       echo 'index page';

   }

}


// and it should work fine 
// good luck and sorry for my bad english