Welcome Guest, Not a member yet? Register   Sign In
CI4 libaries function call in VIEW
#8

(10-27-2020, 11:01 PM)shashi Wrote:
Quote:The only restriction is that the class can not have any constructor parameters. This is intended to be used within views, and is a great aid to modularizing your code.

is that what error ???

Yes you found it! I didn’t see it at first, but the error message is pretty clear. The system instantiate your class with no parameter (because it wouldn’t know what to pass anyway), but your constructor expect 2 parameters:

Quote:Too few arguments to function App\Libraries\Product::__construct(), 0 passed in H:\xampp749\htdocs\aks\system\View\Cell.php on line 123 and exactly 2 expected
Reply


Messages In This Thread
CI4 libaries function call in VIEW - by shashi - 10-26-2020, 06:15 AM
RE: CI4 libaries function call in VIEW - by includebeer - 10-28-2020, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB