Skip to content

4.12.0

Choose a tag to compare

@binaryk binaryk released this 21 Mar 18:44
· 12 commits to 4.x since this release
48152e8

Added

  • Search by a belongs to column:
// PostRepository

related() {
             'user' => BelongsTo::make('user', 'user', UserRepository::class)->searchable([
                'users.name'
            ])
}

So now your search will consider the users.name as well in a orWhere query:

?search=John Doe this will return you back all your posts where the belongs to user name has %John Doe%

Fixed

  • Sorting by a belongs to column fixed. Before it was working only for the name column, now it's dynamical.