示例#1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $filters = ['files', 'favicon', '_debugbar', 'activities', 'debug'];
     $log = true;
     foreach ($filters as $filter) {
         $log = strpos($request->path(), $filter) === false ? $log : false;
     }
     if ($log && !$request->ajax() && Auth::user() && $request->path() != "/") {
         Activity::log();
     }
     return $next($request);
 }
示例#2
0
 public static function sendTicketUpdate($id)
 {
     $ticket = Ticket::find($id);
     self::setSubject("Ticket Update | Ticket #" . $ticket->id . " | " . $ticket->anchestor(0)->changer->person->name());
     self::$view = "emails/ticket_update";
     self::$data['title'] = "Ticket #" . $ticket->id . " details changed by " . $ticket->anchestor(0)->changer->person->name();
     self::$data['ticket'] = $ticket;
     self::add('to', $ticket->assignee->email);
     $additional_emails = explode(",", $ticket->emails);
     foreach ($additional_emails as $email) {
         self::add('to', $email);
     }
     self::send();
     Activity::log("Email Ticket Update Send", self::$data);
 }