public function move()
 {
     if (Location::count() > 1) {
         $this->rem_ses('');
         $locations = LocationMovingTr::all();
         return view('location.move')->with('location', $locations);
     } else {
         Alert::error('Anda hanya memiliki satu gudang ! Tambah gudang baru untuk menggunakan menu ini !');
         return Redirect::to('/');
     }
 }
Exemple #2
0
 public static function check_data($user)
 {
     if ($user == 'moving') {
         $data = LocationMovingTr::count();
     } elseif ($user == 'items') {
         $data = Item::count();
     } elseif ($user == 'location') {
         $data = Location::count();
     } elseif ($user == 'sale') {
         $data = Sale::count();
     } elseif ($user == 'receiving') {
         $data = Receiving::count();
     } elseif ($user == 'saletemp') {
         $data = SaleTemp::count();
     }
     return $data;
 }