Welcome Guest, Not a member yet? Register   Sign In
Entities not uses by model with custom model method
#2

Your function doesn't return entities because you're calling the query builder. The functions that will return an Entity object are find() and findAll() from the Model class. You can use WHERE clauses with findAll(). I'm not sure about the FIELD() function...

PHP Code:
$listePays $Pays
    
->where( ['is_eu' => 1] )
    ->orderBy('langFr')
    ->findAll(); 
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: Entities not uses by model with custom model method - by includebeer - 07-29-2021, 10:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB