Skip to content

Declaration of Column::data does not compatible with Fluent::data #229

Closed
@alberto-morais-oliveira-f

Description

Summary of problem or feature request

Error

Declaration of Yajra\DataTables\Html\Column::data(array|string $value): static must be compatible with Illuminate\Support\Fluent::data($key = null, $default = null)

Code snippet of problem

File vendor/yajra/laravel-datatables-html/src/Html/Column.php, function data (line 305 - 310) was the reason:

public function data(array|string $value): static
{
     $this->attributes['data'] = $value;

     return $this;
}

System details

Operating System: Linux Debian 12
PHP Version: 8.3
Laravel Version: laravel/framework ^11.34
Laravel-Datatables Version: yajra/laravel-datatables ^11.0

Solution

File vendor/yajra/laravel-datatables-html/src/Html/Column.php, change function data (line 305 - 310) to:

public function data($key = null, $default = null): static
{
    $this->attributes['data'] = $key;

    return $this;
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy