Code Monkey home page Code Monkey logo

tomatophp / filament-alerts Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 3.0 3.3 MB

Send notification to users using notification templates and multi notification channels, it's support Filament Native Notification Service with macro, and a full integration to FCM service worker notifications

Home Page: https://tomatophp.com

License: MIT License

PHP 97.80% Blade 2.20%
database discord email fcm filamentphp filamentphp-plugin integration message-bird notifications pusher slack

filament-alerts's People

Contributors

3x1io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

filament-alerts's Issues

No registration tokens provided in /vendor/kreait/firebase-php/src/Firebase/Messaging/RegistrationTokens.php:61

Hi,

I am getting below error when trying to send using FCM

No registration tokens provided in /vendor/kreait/firebase-php/src/Firebase/Messaging/RegistrationTokens.php:61

Kreait\Firebase\Exception\Messaging\InvalidArgument: No registration tokens provided in /vendor/kreait/firebase-php/src/Firebase/Messaging/RegistrationTokens.php:61
Stack trace:
#0 /vendor/kreait/firebase-php/src/Firebase/Messaging.php(74): Kreait\Firebase\Messaging\RegistrationTokens::fromValue(Array)
#1 /vendor/tomatophp/fcm-notifications/src/FcmChannel.php(46): Kreait\Firebase\Messaging->sendMulticast(Object(Kreait\Firebase\Messaging\CloudMessage), Array)
#2 [internal function]: NotificationChannels\Fcm\FcmChannel->NotificationChannels\Fcm\{closure}(Object(Illuminate\Support\Collection), 0)
#3 /vendor/laravel/framework/src/Illuminate/Collections/Arr.php(605): array_map(Object(Closure), Array, Array)
#4 /vendor/laravel/framework/src/Illuminate/Collections/Collection.php(758): Illuminate\Support\Arr::map(Array, Object(Closure))
#5 /vendor/tomatophp/fcm-notifications/src/FcmChannel.php(46): Illuminate\Support\Collection->map(Object(Closure))
#6 /vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(148): NotificationChannels\Fcm\FcmChannel->send(Object(App\Models\User), Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService))
#7 /vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(App\Models\User), 'b9305c97-2d7b-4...', Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService), 'NotificationCha...')
#8 /vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications\{closure}()
#9 /vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(101): Illuminate\Notifications\NotificationSender->withLocale(NULL, Object(Closure))
#10 /vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(79): Illuminate\Notifications\NotificationSender->sendNow(Object(Illuminate\Database\Eloquent\Collection), Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService))
#11 /vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(39): Illuminate\Notifications\NotificationSender->send(Object(Illuminate\Database\Eloquent\Collection), Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService))
#12 /vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send(Object(App\Models\User), Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService))
#13 /vendor/tomatophp/filament-fcm/src/Jobs/NotifyFCMJob.php(57): App\Models\User->notify(Object(TomatoPHP\FilamentFcm\Notifications\FCMNotificationService))
#14 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob->handle()
#15 /vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#16 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#17 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#18 /vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#19 /vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#20 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob))
#21 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob))
#22 /vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#23 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\Bus\Dispatcher->dispatchNow(Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob), false)
#24 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob))
#25 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob))
#26 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(TomatoPHP\FilamentFcm\Jobs\NotifyFCMJob))
#28 /vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#29 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\Queue\Jobs\Job->fire()
#30 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#31 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(333): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#32 /vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(139): Illuminate\Queue\Worker->runNextJob('redis', 'default', Object(Illuminate\Queue\WorkerOptions))
#33 /vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(122): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'default')
#34 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#35 /vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#36 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#37 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#38 /vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#39 /vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\Container\Container->call(Array)
#40 /vendor/symfony/console/Command/Command.php(279): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#41 /vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#42 /vendor/symfony/console/Application.php(1047): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#43 /vendor/symfony/console/Application.php(316): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#44 /vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#45 /vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(196): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#46 /artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#47 {main}

Bug: Error When Using Plugin in Non-Admin Panels

I'm encountering an error when using the plugin in any panel other than the admin panel. The error occurs specifically when I try to use the plugin in a custom panel that I created for my SaaS application.

I have three panels in my application:

Admin Panel (owner)
Dashboard Panel
Personal Panel

The issue arises in the Dashboard Panel, which is defined as follows:

class DashboardPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->id('dashboard')
            ->path('dashboard');
    }
}

Steps to Reproduce:

  1. Create multiple panels in a SaaS application (e.g., admin, dashboard, personal).
  2. Attach the plugin to a non-admin panel (e.g., dashboard).
  3. Attempt to use the plugin in the dashboard panel.

Expected Behavior:

The plugin should work seamlessly across all panels, not just in the admin panel.

Actual Behavior:

The plugin generates an error when used in any panel other than the admin panel.

Additional Information:

Panel ID where the issue occurs: dashboard
The plugin works fine in the admin panel.

imagen
imagen
imagen

Svg by name not found.

Svg by name "heroicon-o-check-circle" from set "heroicons" not found. This is happens when I try to access the notificatiions template, even though I am using the icon in other places.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.