Implement a comprehensive notification system using Kavenegar SMS
gateway and enhance system traceability through audit logging and
detailed shipment status history.
- SMS Integration:
- Add Kavenegar SMS service with configurable API keys and sender
numbers via system settings.
- Implement automated SMS notifications for shipment approval,
rejection, successful payments, and tracking updates.
- Add administrative UI in Filament to manage SMS gateway settings
and toggle specific notification types.
- Audit & Tracking:
- Apply `Auditable` trait to core models (User, Shipment, Wallet,
etc.) to track changes.
- Refactor `ShipmentStatusHistory` to include status transitions
(`from_status` to `to_status`) and specific reasons for changes.
- Implement `ShipmentObserver` to automate notification triggers
on status changes.
- Database & Config:
- Add migrations for enhanced shipment status history tracking.
- Update `.env.example` and `config/ifnex.php` with Kavenegar
configuration parameters.
31 lines
696 B
PHP
31 lines
696 B
PHP
<?php
|
||
|
||
namespace App\Providers;
|
||
|
||
use Illuminate\Support\ServiceProvider;
|
||
use App\Models\Shipment;
|
||
use App\Observers\ShipmentObserver;
|
||
|
||
class AppServiceProvider extends ServiceProvider
|
||
{
|
||
/**
|
||
* Register any application services.
|
||
*/
|
||
public function register(): void
|
||
{
|
||
//
|
||
}
|
||
|
||
/**
|
||
* Bootstrap any application services.
|
||
*/
|
||
public function boot(): void
|
||
{
|
||
// هک برای رفع مشکل دیسک اکسل در لاراول ۱۱/۱۲
|
||
config(['excel.temporary_files.disk' => 'local']);
|
||
|
||
// ثبت Observer برای اطلاعیههای تغییر سفارش
|
||
Shipment::observe(ShipmentObserver::class);
|
||
}
|
||
}
|