Giter Site home page Giter Site logo

Not working with laravel 5.8 about baum HOT 6 OPEN

alfredkoncsag avatar alfredkoncsag commented on July 17, 2024
Not working with laravel 5.8

from baum.

Comments (6)

mkwsra avatar mkwsra commented on July 17, 2024 4

Just use the new version
"baum/baum": "2.x",

it's mentioned here as well

from baum.

mkwsra avatar mkwsra commented on July 17, 2024 2

@karigarweb since version 2, not sure which tag specifically but you have to do it this way:

/**
 * Get the "default" left column name.
 *
 * @return string
 */
public function getDefaultLeftColumnName()
{
    return 'lft';
}


/**
 * Get the "default" right column name.
 *
 * @return string
 */
public function getDefaultRightColumnName()
{
    return 'rgt';
}

And for sure there is no need for the protected attributes

from baum.

mkwsra avatar mkwsra commented on July 17, 2024 2

And you may use properties if you would like:

    $leftColumnName = 'lft';
    $rightColumnName = 'rgt';

from baum.

shinnlu avatar shinnlu commented on July 17, 2024 2

thanks @mkwsra , it's really help to solve problem from 5.8

from baum.

karigarweb avatar karigarweb commented on July 17, 2024

It just throws another error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'right' in 'order clause' (SQL: select * from types order by right desc limit 1 lock in share mode)

Although my model is configured correctly with following code:

`class Type extends Node implements HasMedia
{

use HasMediaTrait, VueTableSearch;
/**
 * Table name.
 *
 * @var string
 */
protected $table = 'types';

protected $searchAble = [
    'name', 'slug',
];

protected $fillable = ['name','slug','status','lat','lng','parent_id', 'order_id'];

protected $filterJoins = ['parent' => ['name']];

 protected $parentColumn = 'parent_id';
 protected $leftColumn = 'lft';
 protected $rightColumn = 'rgt';
 protected $depthColumn = 'depth';
 protected $orderColumn = 'rgt';
 protected $guarded = array('id', 'parent_id', 'lft', 'rgt', 'depth');`

from baum.

karigarweb avatar karigarweb commented on July 17, 2024

Thanks @mkwsra, this fixed the issue.

from baum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.