byscripts/notifier
Deprecated/soon-to-be-deleted Laravel/PHP notifier package. The author advises not to use it; repository is intended for removal. Not recommended for new projects—look for an actively maintained alternative.
## Getting Started
### Minimal Setup
1. **Installation**: Since the package is deprecated, verify if a fork or alternative exists. If not, skip installation.
```bash
composer require byscripts/notifier
(Note: This will likely fail due to the package being removed. Use as a reference for similar packages like spatie/notifications or laravel-notification-channels instead.)
Configuration: If exploring for learning, check config/notifier.php (if auto-generated) for:
mail, database, slack).First Use Case:
Notifier::send() calls with modern alternatives.ChannelManager pattern with Laravel’s Notification facade.Define Notifications:
ByscriptsNotifier\Notification (if class exists).class OrderShipped extends Notification {
public function via() {
return ['mail', 'database'];
}
}
Send Notifications:
Notifier::send($user, new OrderShipped());
deliver() in the notification class.Channels:
Notifier::extend() (if supported).Notifier::extend('mail', function ($app) {
return new MailChannel($app['mailer']);
});
Events:
notifier.sent or notifier.failed events (if event system exists).Illuminate\Notifications for:
Bus or Events for compatibility.Notifier facade or use Laravel’s Notification testing helpers.Deprecation:
spatie/notifications or Laravel’s core instead.// Old
Notifier::send($user, new OrderShipped());
// New (Laravel 5.5+)
$user->notify(new OrderShipped());
No Queue Support:
Channel Limitations:
slack may not support webhooks or OAuth like modern packages.Configuration Overrides:
config/notifier.php exists, ensure it doesn’t conflict with Laravel’s notifications.php.logs/laravel.log for ByscriptsNotifier\Exceptions (if any).NotificationFailed events.composer dump-autoload if exploring.Custom Channels:
ByscriptsNotifier\ChannelInterface (if defined).Illuminate\Contracts\Queue\ShouldQueue or Illuminate\Notifications\Notification.Event System:
notifier.* events (if implemented). Modern apps use Illuminate\Queue\Events\JobFailed.Fallback Logic:
fallback() method:
$user->route('mail')->fallback(['mail' => 'backup@example.com']);
spatie/notifications for:
notifiable trait:
use Illuminate\Notifications\Notifiable;
$user->notify(new OrderShipped())->onQueue('notifications');
*(Note: All examples assume the package’s structure based on the name and era. Verify against actual code if exploring for legacy purposes.)*
How can I help you explore Laravel packages today?