Laravel 5.6.17 Released


April 23rd, 2018


Last week Laravel released version 5.6.17 with helpers to make subquery joins more straightforward, along with a few minor changes and locking Carbon at 1.25.* on the Laravel 5.6 branch.

Pull request #23818 adds helpers for subquery join clauses, including the joinSub(), leftJoinSub() and rightJoinSub() methods to the query builder.

According to the PR, before this feature, subquery joins were possible through raw SQL:

1$query = DB::table('subtable');
2$sql = '(' . $query->toSql() . ') as "sub"';
3DB::table('table')->join(DB::raw($sql), ...);

With the new helpers you can create subquery joins with raw SQL, a closure, or a query builder:

1DB::table('table')->joinSub('select * from "subtable"', 'sub', ...);
2DB::table('table')->joinSub(function ($q) { $q->from('subtable'); }, 'sub', ...);
3DB::table('table')->joinSub(DB::table('subtable')->where('foo', 'bar'), 'sub', ...);

Next up, a change was made to the validation Rule class, allowing you to pass a collection to the Rule::in() and Rule::notIn():

1use Illuminate\Validation\Rule;
3// A collection...
4$zones = collect(['first-zone', 'second-zone']);
6Validator::make($data, [
7 'zones' => [
8 'required',
9 Rule::in($zones),
10 ],

Here are the full release notes for Laravel 5.6.17:

v5.6.17 (2018-04-17)


  • Added helpers for subquery joins (#23818)


  • Allow PendingResourceRegistration to be fluently registered (#23890)
  • Allow asserting an integer with assertSee*() (#23892)
  • Allow passing Collection to Rule::in() and Rule::notIn() (#23875)


  • Lock Carbon version at 1.25.* (27b8844)


  • Removed form error for password confirmation (#23887)

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.

Laravel News Partners