Esempio n. 1
0
        <th>Course</th>
        <th>Room</th>
        <th>Day</th>
        <th>Period</th>
        <th style="width:200px;">Instructor</th>
        <th>Other Instructors</th>
        <th>Action</th>
    </tr>
	<tbody>

    @foreach ($classes as $class)

    	@if ($class->instructor != 0)
    		<?php 
$day = App\Day::getShortDay($class->cid);
$time = App\Time::getPeriod($class->cid);
$room = App\Room::getRooms($class->cid);
?>

    		@if (!empty($room) AND !empty($time))
    			<form class="save_instructor" method="post" data-alloc = "{{ $class->cid }}">
					<input type="hidden" name="ajax" value="1">
	    			<tr>
	    				<input type="hidden" name="cl_id" value="{{ $class->cid }}">
	    				<td> {{ $class->code }} </td>
	    				<td>
							@if($class->coursemajor != 0)
								<?php 
$course = App\Course::find($class->coursemajor);
?>
Esempio n. 2
0
    $jogador->posicao = Input::get('posicao');
    $jogador->idade = Input::get('idade');
    $jogador->save();
});
/**  Routes Times  **/
Route::get('/', function () {
    return view('times');
});
Route::get("/times", function () {
    return App\Time::all();
});
Route::get("/timedelete/{id}", function ($id) {
    $time = App\Time::find($id);
    //  if(!$time->jogadores){
    $time->delete();
    //  echo "1";
    //}else{
    //  echo  "0";
    //}
});
Route::post("/timeupdate", function () {
    $time = App\Time::find(Input::get('id'));
    $time->nome = Input::get('nome');
    $time->estado = Input::get('estado');
    $time->cidade = Input::get('cidade');
    $time->divisao = Input::get('divisao');
    $time->save();
});
Route::post("/times", function () {
    return App\Time::create(Input::all());
});