/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Discipline::create(['shor_name' => 'KL', 'long_name' => 'Klasická trať']);
     Discipline::create(['shor_name' => 'KT', 'long_name' => 'Krátká trať']);
     Discipline::create(['shor_name' => 'SP', 'long_name' => 'Sprint']);
     Discipline::create(['shor_name' => 'ST', 'long_name' => 'Štafety']);
     Discipline::create(['shor_name' => 'DR', 'long_name' => 'Družstva']);
     Discipline::create(['shor_name' => 'SC', 'long_name' => 'Vplné pořadí']);
     Discipline::create(['shor_name' => 'NO', 'long_name' => 'Noční']);
     Discipline::create(['shor_name' => 'OT', 'long_name' => 'Ostatní']);
 }
Example #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $eventMenu = ['event' => 'active open', 'race' => 'active'];
     $oevent = Oevent::findOrFail($id);
     $discipliens = Discipline::get();
     /*
           $posts = \DB::table('oevent')
     ->leftJoin('users', 'posts.user_id', '=', 'users.id')
     ->select('posts.*', 'posts.title', 'posts.created_at', 'posts.private', 'users.name')
     ->orderBy('created_at', 'desc')
     ->get();
     */
     // /dd($discipliens);
     $oevent_markers = Oevent::find($id)->oevent_markers;
     return view('backend.oevents.show', compact('eventMenu', 'oevent', 'discipliens', 'oevent_markers'));
 }