Beispiel #1
0
 public function saveNumberFormat($numberformat)
 {
     $columns = ['USER_ID' => $this->ID];
     $newData = ['USER_ID' => $this->ID, 'USER_NAME' => $this->username];
     if (array_key_exists('DECIMAL_MARK', $numberformat)) {
         $newData['DECIMAL_MARK'] = $numberformat['DECIMAL_MARK'];
     }
     return UserWorkspace::updateOrCreate($columns, $newData);
 }
Beispiel #2
0
 public function saveWorkSpaceInfo($date_begin, $date_end, $facility_id)
 {
     $user_name = '';
     if (auth()->user() != null) {
         $user_name = auth()->user()->username;
     }
     if (!$user_name) {
         return;
     }
     $date_begin = Carbon::createFromFormat('m/d/Y', $date_begin)->format('Y-m-d');
     $date_end = Carbon::createFromFormat('m/d/Y', $date_end)->format('Y-m-d');
     $condition = array('USER_NAME' => $user_name);
     $obj['W_DATE_BEGIN'] = $date_begin;
     $obj['W_DATE_END'] = $date_end;
     $obj['W_FACILITY_ID'] = $facility_id;
     //\DB::enableQueryLog ();
     UserWorkspace::updateOrCreate($condition, $obj);
     //\Log::info ( \DB::getQueryLog () );
 }