Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Notify Task Bundle Laravel Package

creavo/notify-task-bundle

View on GitHub
Deep Wiki
Context7

CREAVO TaskNotifyBundle

SensioLabsInsight Packagist

Installation

composer require creavo/notify-task-bundle

Add the bundle to your app/AppKernel.php with

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            [...],
            new Creavo\NotifyTaskBundle\CreavoNotifyTaskBundle(),
        ];
        
        return $bundles;
    }
    
    [...]
}

register routing in routing.yml:

notify_task:
    resource: '@CreavoNotifyTaskBundle/Resources/config/routing.xml'
    prefix: /task-notify

Update the doctrine-schema - use

php bin/console doctrine:schema:update

or do a migration:

php bin/console doctrine:migration:diff
php bin/console doctrine:migration:migrate

configuration

add to your config.yml and adjust to your wishes:

creavo_notify_task:
    send_notification_immediately: true
    pushover_enabled: false
    pushover_api_token: YOUR_PUSHOVER_APP_TOKEN
    email_enabled: false
    email_from: symfony@localhost
    email_subject: new notification

usage

create notification:

// create notification
$notification=$this->get('creavo_notify_task.notification')->create($user, 'this is the message', 'optional title', $relatedEntity);

// maybe modify notification further
$notification->setLinkTitle('Test');

// save it
$this->get('creavo_notify_task.notification')->save($nofitication);

// you can also save it with $em directly, but this will not trigger pushover or email-notification
$em->persist($notification);
$em->flush();

todo

  • create only one unread notification - system must check, if it already exists and maybe reject the second notification
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
datacore/hub-sdk
alengo/sulu-http-cache-bundle
croct/coding-standard
croct/plug-php
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php
trappistes/laravel-custom-fields