livewire-datatables
                                
                                 livewire-datatables copied to clipboard
                                
                                    livewire-datatables copied to clipboard
                            
                            
                            
                        Multiple relationship with same table is showing wrong values
This fileds are fetching two different relationships
Column::name('assignedBy.first_name')->label('Assigned by')->alignCenter(),
Column::name('assignedTo.first_name')->label('Assigned to')->alignCenter(),
Both data is coming from same table (users)
public function assignedBy()
{
    return $this->belongsTo(User::class);
}
public function assignedTo()
{
    return $this->belongsTo(User::class);
}
Problem: The data-table is showing same value on both places
select `tasks`.`id` as `id`, `users`.`first_name` as `assignedBy.first_name`, `users`.`first_name` as `assignedTo.first_name` from `tasks` left join `users` on `tasks`.`assigned_by_id` = `users`.`id` where `tasks`.`deleted_at` is null order by `id` desc limit 10 offset 0
Note
#257 is more of an hack and not "a fix".
This issues is still there on the package. And it is clearly not an expected behaviour based on how the package configurations work.
It's still wrong. Please, fix it
This packages is dead. It is having so many issues and almost no attention from its creator.
Move on.
@amit-viacon, this package is wonderful and free, If you have any issue using it. Kindly make a PR and make it great again?
Plus, Why do you create the same relation in 2 different methods?
I agree that the original maintainer of this package is unfortunately not active anymore. This package still is great for many purposes and i will happily merge incoming bug fixes and improvements.
The only "alternative" i know of is https://filamentphp.com/docs/2.x/tables/installation , but its inside the filament universe. (which is a fine universe, if you are doing a backend for your project).
us, Why do you create the same relation in 2 different methods?
@ousid
I have already shown the example. AssignedTo and AssignedBy both are coming from the users table.
I am currently using and maintaining https://github.com/rappasoft/laravel-livewire-tables