Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Join other table in the inertiaTable QueryBuilder request #81

Open
@landryjohn

Description

@landryjohn

I wish to know the proper way to write a querybuilder request for inertia table which can make me use foreign fields in the table. (As weel as fields concatanations).

When i use for instance

$orders = QueryBuilder::for(Order::class) ->defaultSort('created_at')
->allowedIncludes(['user'])
->select('orders.id', 'orders.total_price',
DB::raw("concat(users.last_name, ' ', users.first_name) as full_name"),
'orders.paid', 'orders.shipped', 'orders.created_at', 'users.email')
->join('users', 'orders.user_id', '=', 'users.id')
-> ...

It works, but i lost all the datatables functionnalities (Filter, Search, Sort, ...)

Thank

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions