app/Models/Notification.php
public function getIconAttribute()
    {
        $class = $this->attributes['notifiable_type'];

        /*
         * Resolve the configuration service from the IoC since
         * we don't want to override the Notification models constructor
         * to inject the service
         */
        $config = App::make(ConfigService::class);

        // Make sure we have an instance of the ConfigService returned by the IoC
        if ($config instanceof ConfigService) {
            $icon = $config->setPrefix('maintenance')->get("notifications.icons.$class");

            // Return the models notification icon if it's found
            if (is_string($icon) && !empty($icon)) {
                return $icon;
            }

            /*
             * Looks like the notification icon could not be
             * found, we'll return the default notification icon
             */
            $defaultIcon = $config->setPrefix('maintenance')->get('notifications.icons.default');

            return $defaultIcon;
        }

        return;
    }
public function getIconAttribute()
    {
        $class = $this->attributes['notifiable_type'];

        /*
         * Resolve the configuration service from the IoC since
         * we don't want to override the Notification models constructor
         * to inject the service
         */
        $config = App::make(ConfigService::class);

        // Make sure we have an instance of the ConfigService returned by the IoC
        if ($config instanceof ConfigService) {
            $icon = $config->setPrefix('maintenance')->get("notifications.icons.$class");

            // Return the models notification icon if it's found
            if (is_string($icon) && !empty($icon)) {
                return $icon;
            }

            /*
             * Looks like the notification icon could not be
             * found, we'll return the default notification icon
             */
            $defaultIcon = $config->setPrefix('maintenance')->get('notifications.icons.default');

            return $defaultIcon;
        }

        return;
    }
Returns an html icon class of the type of
notification by retrieving it from the configuration file.

@return string|null