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

PHP Code:
<?= view_cell('\App\Libraries\Product::recentPosts', ['4' '7']) ?>

You have no "recentPosts" function in you libraries. Adjust this line to call the right function.

Also, unless it's to render a block of html to display in your view, you shouldn't call a library directly from your view.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
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-26-2020, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB