/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     //
     $countries = \CountryState::getCountries();
     $states = \CountryState::getStates('US');
     $contact = User::find($id);
     $types = UserType::lists('name', 'id');
     empty($contact->country) ? $contact->country = 'US' : $contact->country;
     return view('contacts.edit', ['
         title' => 'Edit Contact: ' . $contact->fullname, 'contact' => $contact, 'states' => $states, 'countries' => $countries, 'types' => $types]);
 }
 public function testGetCountryStates()
 {
     $states = CountryState::getStates('CA');
     $this->assertRegExp("/([A-Z]{2})/", key($states));
     $this->assertEquals("Manitoba", $states['MB']);
 }