/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $user_id = Session::get('user_id');
     $user = User::find($user_id);
     $childrens = Children::where('user_id', '=', $user_id)->get();
     $all_news = News::where('active', '=', '1')->get();
     return view('user.childrens', ['childrens' => $childrens, 'user' => $user, 'all_news' => $all_news]);
 }
 public function get_proposale($id)
 {
     $selected_program_id = $id;
     $selected_program = Program::find($selected_program_id);
     if (!$selected_program) {
         $selected_program_id = Program::first()->id;
         $selected_program = Program::find($selected_program_id);
     }
     $selected_vacation = Vacation::where('program_id', '=', $selected_program_id)->first();
     $selected_vacation_id = $selected_vacation->id;
     $programs = Program::all();
     $vacations = Vacation::where('program_id', '=', $selected_program_id)->get();
     $parts = Part::where('vacation_id', '=', $selected_vacation_id)->get();
     $user_id = Session::get('user_id');
     $childrens = Children::where('user_id', '=', $user_id)->get();
     $all_news = News::where('active', '=', '1')->get();
     return view('user.proposale')->with('selected_program', $selected_program)->with('selected_vacation', $selected_vacation)->with('programs', $programs)->with('vacations', $vacations)->with('parts', $parts)->with('childrens', $childrens)->with('all_news', $all_news);
 }