Notifications usage

To notify a user, you can use the out of the box laravel notification system:

use Laralum\Notifications\Notifications\MessageNotification;
use Laralum\Users\Models\User;

$user = User::findOrFail(Auth::id());
$user->notify(new MessageNotification($subject, $message, $user = null));

Creating custom Notifications

To create custom notifications keep in mind the following example toDatabase method:

     * Get the database representation of the notification.
     * @param mixed $notifiable
     * @return array
    public function toDatabase($notifiable)
        return [
            'subject' => $this->subject,
            'message' => $this->message,
            'user'    => $this->user,

The subject, message & user are mandatory fields, where user can be null.

Did you know?

Laralum uses consoletvs/charts package to generate all the graphics you see on the panel, from the simple ones to the most complex you might see.


Please consider donating if you liked the project, we currently have no funding and we're spending a lot of time maintaining and developing this project.

The creators

Èrik Campobadal Forés

Aitor Riba Archilla

Major Contributors

Krishan König


Snow McFox