public function switchToUser($id)
    {
        if ($this->service->switchToUser($id)) {
            return redirect('dashboard')->with('message', 'You\'ve switched users.');
        }

        return redirect('dashboard')->with('errors', ['Could not switch users']);
    }
public function switchToUser($id)
    {
        if ($this->service->switchToUser($id)) {
            return redirect('dashboard')->with('message', 'You\'ve switched users.');
        }

        return redirect('dashboard')->with('errors', ['Could not switch users']);
    }
public function switchToUser ( $ id ) { if ( $ this -> service -> switchToUser ( $ id ) ) { return redirect ( 'dashboard' ) -> with ( 'message' , 'You\'ve switched users.' ) ; } return redirect ( 'dashboard' ) -> with ( 'errors' , [ 'Could not switch users' ] ) ; }
Switch to a different User profile

@return \Illuminate\Http\Response
Switch to a different User profile