etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 460 forks source link

Call to undefined method Illuminate\Events\Dispatcher::fire() in Laravel 5.8 #307

Closed kheengz closed 5 years ago

kheengz commented 5 years ago

the fire method has been changed to dispatch here https://laravel.com/docs/5.8/upgrade#events in laravel new upgrade. @etrepat

weboAp commented 5 years ago

@kheengz check the branch:v2.x-dev

  /**
   * Fire the given move event for the model.
   *
   * @param  string $event
   * @param  bool   $halt
   * @return mixed
   */
  protected function fireMoveEvent($event, $halt = true) {
    if ( !isset(static::$dispatcher) ) return true;
    // Basically the same as \Illuminate\Database\Eloquent\Model->fireModelEvent
    // but we relay the event into the node instance.
    $event = "eloquent.{$event}: ".get_class($this->node);
    $method = $halt ? 'until' : 'dispatch';
    return static::$dispatcher->$method($event, $this->node);
  }
kheengz commented 5 years ago

Yeah version v2.x-dev fixes it.

zahirzohair commented 5 years ago

i have exactly the same issue. i tried "buam/buam" : "2.x-dev" but didnt work for me. any other solution ?

kheengz commented 5 years ago

@zahirzohair are you on laravel 5.8?

What specific error are you having?

Nivekiba commented 5 years ago

Yeah version v2.x-dev fixes it.

what should i do if i want to install this version of baum in my laravel project ?

cp-vrkansagara commented 4 years ago

Yeah version v2.x-dev fixes it.

what should i do if i want to install this version of baum in my laravel project ?

composer require "baum/baum:v2.x-dev"