/** * Seed the specialties table. * * @return void * @author PJ */ private function seedTable($data) { foreach ($data as $lineIndex => $row) { $specialty = App\Physician::create(['aoa_mem_id' => $row[0], 'full_name' => $row[1], 'prefix' => $row[2], 'first_name' => $row[3], 'middle_name' => $row[4], 'last_name' => $row[5], 'suffix' => $row[6], 'designation' => $row[7], 'SortColumn' => $row[8], 'MemberStatus' => $row[9], 'City' => $row[10], 'State_Province' => $row[11], 'Zip' => $row[12], 'Country' => $row[13], 'COLLEGE_CODE' => $row[14], 'YearOfGraduation' => $row[15], 'fellows' => $row[16], 'PrimaryPracticeFocusCode' => $row[17], 'PrimaryPracticeFocusArea' => $row[18], 'SecondaryPracticeFocusCode' => $row[19], 'SecondaryPracticeFocusArea' => $row[20], 'website' => $row[21], 'AOABoardCertified' => $row[22] == 'YES' ? 1 : 0, 'address_1' => $row[23], 'address_2' => $row[24], 'Phone' => $row[25], 'Email' => $row[26], 'ABMS' => $row[27] == 'YES' ? 1 : 0, 'lat' => $row[28], 'lon' => $row[29]]); } }
Route::get('doctors/{id}', 'DoctorController@show'); /** * Specialties * */ Route::get('specialties', 'SpecialtyController@index'); /** * Locations * */ Route::get('locations', 'LocationController@index'); Route::get('locations/search', 'LocationController@search'); Route::get('locations/{location}', 'LocationController@show'); }); Route::get('locations/try-this-one', 'LocationController@tryThisOne'); //Route::get('refresh/', 'RefreshController@refresh'); Route::get('test/escape', function () { $results = DB::selectOne(DB::raw("select *\n from temp_locations\n where address_1 = :address\n and City = :city"), array('address' => "901 St Mary's Dr #200", 'city' => "Evansville")); dd($results); }); Route::get('test/mssql/{id}', function ($id) { $user = env('MSSQL_USERNAME'); $password = env('MSSQL_PASSWORD'); $db = new PDO('dblib:host=sql05-1.aoanet.local;dbname=imis', $user, $password); $q = "select * from imis.dbo.vfindyourdo where id = {$id}"; //$stmt = $db->query($q); $stmt = $db->prepare($q); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); $current = App\Physician::where('aoa_mem_id', '=', (int) $row['id'])->first(); });