This is a shorthand method for building joins via join().
The table name can be passed as a string, or as an array in case it needs to
be aliased:
LEFT JOIN authors ON authors.id = posts.author_id
$query->leftJoin('authors', 'authors.id = posts.author_id');
LEFT JOIN authors a ON a.id = posts.author_id
$query->leftJoin(['a' => 'authors'], 'a.id = posts.author_id');
Conditions can be passed as strings, arrays, or expression objects. When
using arrays it is possible to combine them with the $types parameter
in order to define how to convert the values:
$query->leftJoin(['a' => 'articles'], [
'a.posted >=' => new DateTime('-3 days'),
'a.published' => true,
'a.author_id = authors.id'
], ['a.posted' => 'datetime', 'a.published' => 'boolean']);
See join() for further details on conditions and types.