/**
  * Login as the
  *
  * @param $companyId
  * @return \Illuminate\Http\RedirectResponse
  */
 public function loginAs($companyId)
 {
     $company = Company::findOrFail($companyId);
     $user = $company->users()->first();
     Auth::admin()->impersonate('user', $user->id);
     return redirect()->route('user.dashboard');
 }
 public function importNotifications()
 {
     //TODO::do we really need to import this?
     $notifications = DB::connection('old')->table('user_notifications')->get();
     foreach ($notifications as $notification) {
         $company = Company::findOrFail($notification->company_id);
         $orderNumber = $notification->reference;
         switch ($notification->type) {
             case 'add_notes':
                 break;
             case 'cancel_order':
                 break;
             case 'change_order':
                 break;
             case 'confirm_canceled_order':
                 break;
             case 'deny_order':
                 break;
             case 'uncancel_order':
                 break;
         }
     }
 }