public addFrom (mixed $model, [mixed $alias], [mixed $with])
Add a model to take part of the query
// Load data from models Robots $builder->addFrom('Robots'); // Load data from model 'Robots' using 'r' as alias in PHQL $builder->addFrom('Robots', 'r'); // Load data from model 'Robots' using 'r' as alias in PHQL // and eager load model 'RobotsParts' $builder->addFrom('Robots', 'r', 'RobotsParts'); // Load data from model 'Robots' using 'r' as alias in PHQL // and eager load models 'RobotsParts' and 'Parts' $builder->addFrom('Robots', 'r', ['RobotsParts', 'Parts']);
Please login to continue.