Skip to content

New Columns on Relationships doesn't work. #1159

Answered by jurri
jurri asked this question in Q&A
Discussion options

You must be logged in to vote

composer update
php artisan optimize:clear
or return User::query()->with('detail');
doesn't help...

but I found how get it displaying :)
I have to write in first Column::make call the title which I want use later.

It has nothing todo with the relationship. But the mistake is only on relationship-columns.

public static function make(**string $title**, string $from = null): Column
    {
        return new static(**$title**, $from);
    }

example to resolve:

public function columns(): array
{
    return [
        Column::make('Firstname', 'id')->sortable(), // <- change first make() call with title it doesn't display

/// now it would display the title Firstname on table.
        Column::make(

Replies: 1 comment 6 replies

Comment options

lrljoe
Apr 14, 2023
Collaborator Sponsor

You must be logged in to vote
6 replies
@jurri
Comment options

@lrljoe
Comment options

lrljoe Apr 17, 2023
Collaborator Sponsor

@lrljoe
Comment options

lrljoe Apr 17, 2023
Collaborator Sponsor

@jurri
Comment options

Answer selected by jurri
@lrljoe
Comment options

lrljoe Apr 17, 2023
Collaborator Sponsor

@jurri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants