add database and change controller Ticket.php