/**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $tutapos_settings = TutaposSetting::find($id);
     $tutapos_settings->languange = Input::get('languange');
     $tutapos_settings->save();
     Session::flash('message', 'You have successfully saved settings');
     return Redirect::to('tutapos-settings');
 }
示例#2
0
 public static function get_today($today = '')
 {
     if (TutaposSetting::where('id', 1)->first()->languange === 'id') {
         $array_hari = array(1 => "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu", "Minggu");
         $hari = $array_hari[date("N")];
         $tanggal = date("j");
         $array_bulan = array(1 => "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
         $bulan = $array_bulan[date("n")];
         $tahun = date("Y");
         $today = "{$hari}, {$tanggal} {$bulan} {$tahun}";
     } else {
         $hari = date("l");
         $tanggal = date("j");
         $bulan = date("F");
         $tahun = date("Y");
         $today = "{$hari}, {$tanggal} {$bulan} {$tahun}";
     }
     return $today;
 }