app/Listeners/CustomerRenewalReminderListener.php
/**
     * Handle the event.
     *
     * @param  CustomerRenewalReminder  $event
     * @return void
     */
Handle the event.
@param  CustomerRenewalReminder  $event
@return void
Handle the event . @param CustomerRenewalReminder $event @return void
public function handle(CustomerRenewalReminder $event)
    {
        if(!is_null($event->customer)){
            CustomerReminder::dispatch($event->customer);
        }else{
            Customer::servicesExpiring()->get()->each(function($customer){
                CustomerReminder::dispatch($customer);
            });
        }
    }
public function handle ( CustomerRenewalReminder $ event ) { if ( ! is_null ( $ event -> customer ) ) { CustomerReminder :: dispatch ( $ event -> customer ) ; } else { Customer :: servicesExpiring ( ) -> get ( ) -> each ( function ( $ customer ) { CustomerReminder :: dispatch ( $ customer ) ; } ) ; } }
Handle the event.
Handle the event .