I have implemented the basic example from the documentation and I get an error.
namespace App\Http\Livewire;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column;
class UserTable extends DataTableComponent
public function columns(): array
return [
Column::make('Name')
->sortable()
->searchable(),
Column::make('E-mail', 'email')
->sortable()
->searchable(),
public function query(): Builder
return User::query();
<div class="card-body">
<livewire:users-table />
Any insights ?
Thank you
use App\Support\Collection;
use Spatie\Permission\Traits\HasRoles;
use App\Traits\UserTrait;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Laravel\Passport\HasApiTokens;
class User extends Authenticatable
use \Staudenmeir\EloquentHasManyDeep\HasRelationships;
use Notifiable;
use HasRoles;
use UserTrait;
use HasApiTokens;
* The attributes that are mass assignable.
* @var array
protected $fillable = [
'name', 'email', 'password', 'activate_notification',
protected $appends = ['allPermissions', 'profilelink', 'avatarlink', ];
* The attributes that should be hidden for arrays.
* @var array
protected $hidden = [
'password', 'remember_token',
* The attributes that should be cast to native types.
* @var array
protected $casts = [
'email_verified_at' => 'datetime',
public function groups()
return $this->belongsToMany(Group::class, 'group_user', 'user_id', 'group_id');
public function sensors()
return $this->hasManyDeep(
Sensor::class,
[GroupUser::class, Group::class, SensorGroup::class],
'user_id', // Foreign key on the "group_user" table.
'id', // Foreign key on the "Group" table (local key).
'group_id', // Foreign key on the "SensorGroup" table.
'id' // Foreign key on the "sensors" table.
'id', // Local key on the "users" table.
'group_id', // Local key on the "group_user" table (foreign key).
'id', // Local key on the "SensorGroup" table.
'sensor_id' // Local key on the "sensor" table.
)->with('asset');
return $query->where(
fn ($query) => $query->orWhereHas('groups', function ($query) use ($term) {
return $query->where('name', 'like', '%' . $term . '%');
})->orWhere('users.name', 'like', '%' . $term . '%')
->orWhere('email', 'like', '%' . $term . '%')
public function scopeNotificationActivated($query)
return $query->where("activate_notification", true);
public function scopeSuperAdmin($query)
return $query->role('Super Admin');
public function scopeAdmin($query)
return $query->role('Admin');
public function scopeSupervisor($query)
return $query->role('Supervisor');
public function scopeUser($query)
return $query->role('User');
@lilouch do you still have the same issue with the most recent version of the repository?
Also did you publish / modify the views files?