app/Listeners/TicketsListener.php
/**
     * trigger when the ticket is created
     */
trigger when the ticket is created
trigger when the ticket is created
public function created()
    {
      $ticket_number = new CreateTicketSequence($this->ticket);
       if (!$ticket_number->has_error)
       {
           $this->ticket->ticket_number = $ticket_number->getTicketSequence();
           $this->ticket->save();
       }
    }
public function created ( ) { $ ticket_number = new CreateTicketSequence ( $ this -> ticket ) ; if ( ! $ ticket_number -> has_error ) { $ this -> ticket -> ticket_number = $ ticket_number -> getTicketSequence ( ) ; $ this -> ticket -> save ( ) ; } }
trigger when the ticket is created
trigger when the ticket is created
/**
         * Add Ticket Number
         */