コード例 #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $user = User::where('id', Auth::user()->id)->first();
     $disability_types = DisabilityType::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $victim_types = VictimType::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $black_communities = BlackCommunity::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $indigenous_peoples = IndigenousPeople::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $ethnic_groups = EthnicGroup::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $credits = Credit::whereNotIn('id', [1])->orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $schedules = Schedule::orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $programs = Program::orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $civil_states = CivilState::orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $sexes = Sex::orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     $sexual_orientations = SexualOrientation::orderBy('description', 'ASC')->lists('description', 'id')->toArray();
     return view('app.data_update.create', compact('sexes', 'sexual_orientations', 'civil_states', 'programs', 'schedules', 'credits', 'ethnic_groups', 'indigenous_peoples', 'black_communities', 'victim_types', 'disability_types', 'user'));
 }