Esempio n. 1
0
                            <table data-toggle="table" data-url="tables/data1.json">
                                <thead>
                                <tr>
                                    <th>primer equipo </th>
                                    <th>segundo equipo</th>
                                    <th>fecha</th>
                                    <th>hora </th>

                                </tr>
                                </thead>
                                <?php 
    $fixturefecha = Fixture::where('nroFecha', '=', $fecha)->where('codRueda', '=', $torneo->codRueda)->get();
    ?>
                                <?php 
    $fixture2 = Fixtureaux::where('nroFecha', '=', $fecha)->where('codRueda', '=', $torneo->codRueda)->get();
    ?>
                                <tbody>
                                <?php 
    $descansa = "";
    ?>
                                @foreach($fixture2 as $value)
                                    <?php 
    if ($value->codEquipo1 == "") {
        ?>
                                    <?php 
        $descansa = $value->codEquipo2;
        ?>
                                    <?php 
    }
    ?>
Esempio n. 2
0
 public function detail($codcampeonato, $idtorneo, $idfecha)
 {
     $torneo = Torneo::where('codRueda', '=', $idtorneo)->first();
     $fecha = Fechas::where('idFecha', '=', $idfecha)->first();
     $fixture = Fixture::where('nroFecha', '=', $fecha->nroFecha)->where('codRueda', '=', $idtorneo)->get();
     $fixturedeequipoqueescansa = Fixtureaux::where('nroFecha', '=', $fecha->nroFecha)->where('codRueda', '=', $idtorneo)->first();
     $equipoquedescansa = '';
     // $todoConclusion = Cambio::all();
     if ($fixturedeequipoqueescansa != '') {
         if ($fixturedeequipoqueescansa->codEquipo1 == '') {
             $equipoquedescansa = Equipo::where('codEquipo', '=', $fixturedeequipoqueescansa->codEquipo2)->first();
         } else {
             $equipoquedescansa = Equipo::where('codEquipo', '=', $fixturedeequipoqueescansa->codEquipo1)->first();
         }
     }
     return View::make('user_com_organizing.fecha.detail', compact('fecha'))->with('fixture', $fixture)->with('torneo', $torneo)->with('equipoquedescansa', $equipoquedescansa)->with('codcampeonato', $codcampeonato);
 }
Esempio n. 3
0
 function fixture($idcampeonato, $idtorneo)
 {
     $this->establecer($idcampeonato, $idtorneo);
     $fixtureaux = Fixtureaux::all();
     foreach ($fixtureaux as $val) {
         if ($val->codEquipo1 && $val->codEquipo2) {
             $id = $val->codFixture;
             $equipo1 = $val->codEquipo1;
             $equipo2 = $val->codEquipo2;
             $nropartido = $val->nroPartido;
             $fecha = $val->nroFecha;
             $hora = $val->hora;
             $torneo = $val->codRueda;
             $elemento = Fixtureaux::find($id);
             $elemento->delete();
             $nuevo = new Fixture();
             $nuevo->codFixture = $id;
             $nuevo->codEquipo1 = $equipo1;
             $nuevo->codEquipo2 = $equipo2;
             $nuevo->nroPartido = $nropartido;
             $nuevo->nroFecha = $fecha;
             $nuevo->hora = $hora;
             $nuevo->codRueda = $torneo;
             $nuevo->save();
         }
     }
     return Redirect::to('torneo/' . $idtorneo . '/' . $idcampeonato . '/detail.html');
 }