khuloodbatis / notification-generator
Laravel package to generate notifications, events, listeners, markdown + translations
Package info
github.com/KhuloodBatis/notification-generator
pkg:composer/khuloodbatis/notification-generator
dev-main
2025-11-20 10:45 UTC
Requires
- php: >=8.2
- illuminate/support: ^10.0|^11.0
This package is auto-updated.
Last update: 2026-02-20 11:23:34 UTC
README
Notification Generator for Laravel
A lightweight Laravel package that automatically generates a full Notification workflow:
- Notification (Markdown or Default)
- Event
- Listener
- Translations (English + Arabic)
- Auto-registers service provider using Laravel Auto-Discovery
- Clean, simple, and extendable architecture
Perfect for teams who repeatedly create similar notifications and want consistent scaffolding with one Artisan command.
๐ Features
- Generate Notification + Event + Listener in one command
- Auto-create Markdown email template
- Auto-create Localization files (
resources/lang/en+resources/lang/ar) - Supports Laravel 10 & Laravel 11
- PSR-4 package structure
- Plug-and-play service provider auto-discovery
- Clean code, extendable stubs, and maintainable architecture
๐งฉ Installation
Require the package through Composer:
composer require khuloodbatis/notification-generator:dev-main If you use a specific version: composer require khuloodbatis/notification-generator:^1.0 Laravel will automatically register the service provider via auto-discovery. ๐ฆ Publish Stubs & Config (optional) If your package provides stubs or configuration: bash Copy code php artisan vendor:publish --tag=notification-generator ๐ ๏ธ Usage Generate a complete Notification workflow: bash Copy code php artisan khuloodbatis:make-notification UserActivated This command will generate: swift Copy code app/Notifications/UserActivated.php app/Events/UserActivatedEvent.php app/Listeners/UserActivatedListener.php resources/views/mail/user-activated.blade.php lang/en/notifications.php lang/ar/notifications.php ๐ Output Structure 1. Notification Located at: swift Copy code app/Notifications/{Name}.php 2. Event swift Copy code app/Events/{Name}Event.php 3. Listener swift Copy code app/Listeners/{Name}Listener.php 4. Markdown Template swift Copy code resources/views/mail/{kebab-case-name}.blade.php 5. Localization bash Copy code resources/lang/en/notifications.php resources/lang/ar/notifications.php ๐งช Testing You can run PHPUnit tests: bash Copy code php artisan test or: bash Copy code vendor/bin/phpunit (If your package includes tests) ๐งฑ Package Structure css Copy code notification-generator/ โโโ src/ โ โโโ Commands/ โ โ โโโ MakeFullNotificationCommand.php โ โโโ NotificationGeneratorServiceProvider.php โ โโโ ... โโโ composer.json โโโ README.md โโโ ... ๐งฌ Requirements PHP 8.1+ Laravel 10 or Laravel 11 ๐ง Configuration If needed, you may override: default stubs markdown paths language structure By publishing the configuration: bash Copy code php artisan vendor:publish --tag=notification-generator ๐ค Contributing Contributions, issues, and feature requests are welcome! Feel free to open a PR or Issue. ๐ชช License This package is open-source software licensed under the MIT License. ๐งท Author Khulood Batis Laravel Backend Developer GitHub: https://github.com/khuloodbatis ๐ Reliable Sources Used Laravel Package Development https://laravel.com/docs/11.x/packages Composer Package Publishing (Packagist) https://getcomposer.org/doc/04-schema.md Laravel Notifications (Markdown) https://laravel.com/docs/11.x/notifications