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 is found to be the only CMS that still gives you the ability to manage the views and the website the way you like, without any problems with the correct functionality of it.


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