findAllByField

Navigation:  Development > Function Reference > Model >

findAllByField

Previous pageReturn to chapter overviewNext page

This is a type of findAll method but here we can apply condition by Magic Method. See below format
 
App::Model(Model)->findAllBy[Field]([Value]);
 

Return multiple entry from the table.

 
Here [Field] is any database field of table, [Value] is a data that we want to apply in the query.
 
For example:
 
App::Model('Page')->findAllByType('static-page');