Esempio n. 1
0
 /**
  * Planning constructor.
  * @param Seance $seance
  * @param Inscription $inscription
  */
 public function __construct(Seance $seance = null, Inscription $inscription = null)
 {
     $this->seance = $seance;
     $this->inscription = $inscription;
     $this->jaugeMax = $this->seance->getSpectacle()->getNbPlace();
     $this->jaugeUtilise = $this->inscription->getNbAdultes() + $this->inscription->getNbEnfants();
 }
Esempio n. 2
0
 public function postSearch()
 {
     $q = Input::get('query');
     $seances = Seance::where('name', 'LIKE', '%' . $q . '%')->get();
     $title = "Seances: " . count($seances);
     return View::make('hello', compact('seances', 'title'));
 }
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Seance::create([]);
     }
 }
 public function home()
 {
     if (Auth::guest()) {
         return Redirect::to('/login');
     }
     //appel des composants en base
     $nb_patients_total = Patient::all()->count();
     $nb_seances_total = Seance::all()->count();
     $nb_patients_semaine = Patient::where('created_at', '>=', time() - 7 * 24 * 60 * 60)->count();
     $nb_seances_semaine = Seance::where('date', '>=', time() - 7 * 24 * 60 * 60)->count();
     //retour de la vue
     return View::make('backend.home', compact('nb_patients_total', 'nb_seances_total', 'nb_patients_semaine', 'nb_seances_semaine'));
 }
Esempio n. 5
0
@extends('layouts.scaffold')

@section('main')

<h1>Edit Ticket</h1>
<?php 
$users = array(0 => 'Choose User');
foreach (User::get(array('id', 'username')) as $user) {
    $users[$user->id] = $user->username;
}
?>

<?php 
$seances = array(0 => 'Choose Seance');
foreach (Seance::get(array('id', 'name')) as $seance) {
    $seances[$seance->id] = $seance->name;
}
?>
{{ Form::model($ticket, array('method' => 'PATCH', 'route' => array('tickets.update', $ticket->id))) }}
	<ul>
        <li>
            {{ Form::label('price', 'Price:') }}
            {{ Form::text('price') }}
        </li>

        <li>
            {{ Form::label('seance_id', 'Seance:') }}
            {{ Form::select('seance_id', $seances) }}
        </li>

        <li>
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Seance::destroy($id);
     return Redirect::route('backend.seances.index');
 }
Esempio n. 7
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $this->seance->find($id)->delete();
     return Redirect::route('seances.index');
 }
echo $cour . "</br>";
echo "Type(s) : </br>";
$type = new Type(1, "CM");
echo $type->getNo_type() . "</br>";
echo $type->getNom() . "</br>";
echo $type . "</br>";
echo "Matiere(s) : </br>";
$matiere = new Matiere(1, "Base de données", "BdD", 1, 1);
echo $matiere->getNo_matiere() . "</br>";
echo $matiere->getNom() . "</br>";
echo $matiere->getInitiales() . "</br>";
echo $matiere->getNo_module() . "</br>";
echo $matiere->getNo_section() . "</br>";
echo $matiere . "</br>";
echo "Seance(s) : </br>";
$seance = new Seance(1, "21/10/2015", 1, 1, 1, 1, 1);
echo $seance->getNo_seance() . "</br>";
echo $seance->getDate_debut() . "</br>";
echo $seance->getNo_cours() . "</br>";
echo $seance->getNo_ordre() . "</br>";
echo $seance->getNo_section() . "</br>";
echo $seance->getNo_groupe() . "</br>";
echo $seance->getNo_sous_groupe() . "</br>";
echo $seance . "</br>";
echo "Section(s) : </br>";
$section = new Section(1, "2A-S3", 1, 1);
echo $section->getNo_section() . "</br>";
echo $section->getNom() . "</br>";
echo $section->getDate_debut() . "</br>";
echo $section->getDate_fin() . "</br>";
echo $section . "</br>";