Exemplo n.º 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show(QueryRequest $request, $id)
 {
     $entry = $this->log->date(strtotime($request->get('date')))->find($id);
     $raw = explode(': ', $entry->header, 2)[1];
     $line = explode(' {', $raw, 2);
     $log = ['date' => Carbon::createFromFormat('Y-m-d H:i:s', $entry->date), 'level' => $entry->level, 'message' => $line[0], 'context' => isset($line[1]) ? '{' . $line[1] : null, 'id' => $entry->id, 'stack' => $entry->stack];
     return view('system.entry', compact('log'));
 }
Exemplo n.º 2
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['status' => ['regex:/^(-?(open|closed|new)){1,3}$/'], 'staff_id' => ['regex:/^\\d+(-\\d+)*$/']]);
 }
Exemplo n.º 3
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), ['status' => ['array', 'in:open,new,closed,resolved'], 'assigned_id' => ['array', 'exists:users,id,is_staff,1'], 'dept_id' => ['array', 'exists:depts,id'], 'priority' => ['array', 'between:1,5'], 'created_at' => []]);
 }
Exemplo n.º 4
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     return array_merge(parent::rules(), []);
 }