public function registerEventListeners($model)
    {
        $activities = $this->config('activities', $model);

        foreach ($activities as $activity) {
            call_user_func("$model::$activity", function ($instance) use ($activity) {
                $this->{$activity}($instance);
            });
        }
    }
public function registerEventListeners($model)
    {
        $activities = $this->config('activities', $model);

        foreach ($activities as $activity) {
            call_user_func("$model::$activity", function ($instance) use ($activity) {
                $this->{$activity}($instance);
            });
        }
    }
public function registerEventListeners ( $ model ) { $ activities = $ this -> config ( 'activities' , $ model ) ; foreach ( $ activities as $ activity ) { call_user_func ( "$model::$activity" , function ( $ instance ) use ( $ activity ) { $ this -> { $ activity } ( $ instance ) ; } ) ; } }
Register model event listeners.

@param  string  $model
@return void
Register model event listeners .