protected function registerMessages()
    {
        $messageTypes = [
            'error'   => ErrorMessages::class,
            'info'    => InfoMessages::class,
            'success' => SuccessMessages::class,
            'warning' => WarningMessages::class,
        ];
        foreach ($messageTypes as $messageType) {
            $this->app[WidgetsRegistryInterface::class]->registerWidget($messageType);
        }

        $this->app->singleton('sleeping_owl.message', function () use ($messageTypes) {
            return new MessageStack($messageTypes);
        });
    }
protected function registerMessages()
    {
        $messageTypes = [
            'error'   => ErrorMessages::class,
            'info'    => InfoMessages::class,
            'success' => SuccessMessages::class,
            'warning' => WarningMessages::class,
        ];
        foreach ($messageTypes as $messageType) {
            $this->app[WidgetsRegistryInterface::class]->registerWidget($messageType);
        }

        $this->app->singleton('sleeping_owl.message', function () use ($messageTypes) {
            return new MessageStack($messageTypes);
        });
    }
protected function registerMessages ( ) { $ messageTypes = [ 'error' => ErrorMessages :: class , 'info' => InfoMessages :: class , 'success' => SuccessMessages :: class , 'warning' => WarningMessages :: class , ] ; foreach ( $ messageTypes as $ messageType ) { $ this -> app [ WidgetsRegistryInterface :: class ] -> registerWidget ( $ messageType ) ; } $ this -> app -> singleton ( 'sleeping_owl.message' , function ( ) use ( $ messageTypes ) { return new MessageStack ( $ messageTypes ) ; } ) ; }
Global register messages of adminpanel.
Global register messages of adminpanel .