public function store() { $id = Input::get('ID'); $kitType = KitTypes::find($id); $kitType->fill(Input::all()); $kitType->save(); return "OK"; }
public function show2($LogKey1 = NULL, $LogKey2 = NULL) { $clause = "LogKey1 = " . $LogKey1; $filters = array(); if (Input::get('FILTERS-ALL') != "T") { $filters = $this->ArrayOfFilters(Input::all()); $clause = $this->GetFilterClause($filters) . "LogKey1 = " . $LogKey1; } else { foreach (LogType::all() as $logType) { array_unshift($filters, $logType->ID); } } if ($LogKey2) { $clause = $clause . " and LogKey2 = " . $LogKey2; } $logs = Logs::whereraw($clause)->get(); $kTyp = KitTypes::find($LogKey1); $kit = Kits::find($LogKey2); $title = "Log for " . $kTyp->Name . " -> " . $kit->Name; if ((int) $kit->Specialized == 1) { $title = $title . ' + ' . $kit->SecializedName; } return CheckIfAuthenticated('Logs.show', ['ID' => $LogKey2, 'logs' => $logs, 'logTitle' => $title, 'logTypes' => LogType::all(), 'filters' => $filters], 'home.index', [], true); }