Ejemplo n.º 1
0
 protected function postCreate(Request $request)
 {
     $ticket = Ticket::create(['description' => $request->input('description'), 'urgency' => $request->input('urgency'), 'category_id' => $request->input('category'), 'created_by_id' => Auth::user()->id]);
     $progress = new Progress(['state_id' => '1', 'actioned_by' => Auth::user()->id, 'ticket_id' => $ticket->id]);
     $ticket->progress()->save($progress);
     event(new TicketCreated(['ticket-id' => $ticket->id, 'message' => 'New ticket created. Priority ' . $request->input('urgency')]));
     return redirect()->route('ticket/view', [$ticket->id]);
 }
Ejemplo n.º 2
0
 protected function create()
 {
     $params = Input::all();
     $ticket = Ticket::create($params);
     return $ticket;
 }