public function getMyprofile()
 {
     $id = Auth::user()->id;
     $alumni_id = null;
     $sql = "SELECT * FROM alumni WHERE account_id = ?";
     $prof = DB::select($sql, array($id));
     if ($prof != null) {
         $alumni_id = $prof[0]->id;
     }
     $sql2 = "SELECT * FROM degree WHERE alumni_id = ?";
     $deg = DB::select($sql2, array($alumni_id));
     $sql3 = "SELECT * FROM work_experience WHERE alumni_id = ?";
     $wrk_exp = DB::select($sql3, array($alumni_id));
     $sql4 = "SELECT * FROM certificate WHERE alumni_id = ?";
     $certificate = DB::select($sql4, array($alumni_id));
     // $sql5 = "SELECT * FROM alumni_tracer WHERE alumni_id = ?";
     $sql5 = "SELECT at.*, sq.question, sc.choice\n\t\t\t\tFROM alumni_tracer AS at\n\t\t\t\tINNER JOIN survey_questions AS sq\n\t\t\t\tON sq.id = at.question_id\n\t\t\t\tINNER JOIN survey_choices AS sc\n\t\t\t\tON sc.id = at.choice_id\n\t\t\t\tWHERE at.alumni_id = ?\n\t\t\t\tORDER BY at.question_id";
     $a_tracer = DB::select($sql5, array($alumni_id));
     $dept = Department::all();
     $region = Region::all();
     $province = Province::all();
     $occupation = Occupation::all();
     $company = Company::all();
     $deg_title = DegreeTitle::all();
     $school = School::all();
     $jobs = Job::all();
     $field = Field::all();
     $questions = DB::select("SELECT * FROM survey_questions");
     $civil_status = DB::select("SELECT * FROM civil_status");
     return View::make('user.profile')->with('company', $company)->with('field', $field)->with('occupation', $occupation)->with('work_exp', $wrk_exp)->with('degree', $deg)->with('a_tracer', $a_tracer)->with('certificate', $certificate)->with('school', $school)->with('deg_title', $deg_title)->with('profile', $prof)->with('dept', $dept)->with('region', $region)->with('province', $province)->with('civil_status', $civil_status)->with('questions', $questions)->with('jobs', $jobs);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $fields = $this->field->all();
     return View::make('fields.index', compact('fields'));
 }