app/Providers/EventServiceProvider.php
/**
     * Register any other events for your application.
     *
     * @param  \Illuminate\Contracts\Events\Dispatcher  $events
     * @return void
     */
Register any other events for your application.
@param  \Illuminate\Contracts\Events\Dispatcher  $events
@return void
Register any other events for your application . @param \ Illuminate \ Contracts \ Events \ Dispatcher $events @return void
public function boot(DispatcherContract $events)
    {
        parent::boot($events);
        $modules = new \Ormic\Modules();
        foreach ($modules->getModels(true) as $class => $model) {
            if (class_exists($class)) {
                $classInfo = new \ReflectionClass($class);
                if (!$classInfo->isAbstract() && $classInfo->isSubclassOf('Ormic\Model\Base')) {
                    $class::observe(new \Ormic\Observers\Datalog());
                }
            }
        }
    }
public function boot ( DispatcherContract $ events ) { parent :: boot ( $ events ) ; $ modules = new \ Ormic \ Modules ( ) ; foreach ( $ modules -> getModels ( true ) as $ class => $ model ) { if ( class_exists ( $ class ) ) { $ classInfo = new \ ReflectionClass ( $ class ) ; if ( ! $ classInfo -> isAbstract ( ) && $ classInfo -> isSubclassOf ( 'Ormic\Model\Base' ) ) { $ class :: observe ( new \ Ormic \ Observers \ Datalog ( ) ) ; } } } }
Register any other events for your application.
Register any other events for your application .
// Register an observer on each model.