/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     // Add ten children to the DB
     for ($i = 0; $i < 10; $i++) {
         $firstName = $faker->firstName;
         $lastName = $faker->lastName;
         App\Child::create(["household_id" => $faker->numberBetween(1, 5), "name_first" => $firstName, "name_middle" => $faker->firstName, "name_last" => $lastName, "dob" => $faker->date, "race" => "race", "last4ssn" => $faker->numerify("####"), "free_or_reduced_lunch" => $faker->randomElement(["Y", "N"]), "reason_for_nomination" => $faker->text(200), "school_name" => $faker->text(30), "school_address" => $faker->address, "school_address2" => "", "school_city" => $faker->city, "school_state" => "WW", "school_zip" => $faker->numerify("#####"), "school_phone" => $faker->phoneNumber, "bike_want" => $faker->randomElement(['Y', 'N']), "bike_size" => $faker->randomElement(['12', '24']), "bike_style" => $faker->randomElement(["A", "B", "C"]), "clothes_want" => $faker->randomElement(['Y', 'N']), "clothes_size_shirt" => $faker->randomElement(['S', 'M', 'L']), "clothes_size_pants" => $faker->randomElement(['S', 'M', 'L']), "shoe_size" => $faker->numerify("#"), "favourite_colour" => $faker->randomElement(['Red', 'Blue', 'Green', 'Orange']), "interests" => $faker->text(30), "additional_ideas" => $faker->text(50), "preferred_contact_method" => $faker->randomElement(['Phone', 'Email'])]);
         $this->command->info("Seeded Child: {$firstName} {$lastName}");
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker\Factory::create();
     // Add ten children to the DB
     for ($i = 0; $i < 55; $i++) {
         $firstName = $faker->firstName;
         $lastName = $faker->lastName;
         App\Child::create(["household_id" => $faker->numberBetween(1, 49), "name_first" => $firstName, "name_middle" => $faker->firstName, "name_last" => $lastName, "dob" => $faker->date, "race" => $faker->randomElement(\App\Household::$raceOptions), "last4ssn" => $faker->numerify("####"), "free_or_reduced_lunch" => $faker->randomElement(["Y", "N"]), "reason_for_nomination" => $faker->text(200), "school_id" => $faker->numberBetween(60, 160), "bike_want" => $faker->randomElement(['Y', 'N']), "bike_size" => $faker->randomElement(['Tricycle', '12” Bicycle', '16” Bicycle', '20” Coaster Brake Bicycle', '20” Geared Bicycle', '24” Geared Bicycle']), "bike_style" => $faker->randomElement(["Mountain", "BMX", "Tricycle"]), "clothes_want" => $faker->randomElement(['Y', 'N']), "clothes_size_shirt" => $faker->randomElement(['S', 'M', 'L']), "clothes_size_pants" => $faker->randomElement(['S', 'M', 'L']), "shoe_size" => $faker->numerify("#"), "favourite_colour" => $faker->randomElement(['Red', 'Blue', 'Green', 'Orange']), "interests" => $faker->text(30), "additional_ideas" => $faker->text(50)]);
         //            $this->command->info("Seeded Child: {$firstName} {$lastName}");
     }
 }
示例#3
0
            <div class="panel-body">
                <a href="{{ action('ChildrenController@index') }}">
                    <div class="bloc_info"><img src="{{  asset('images/enfants.png') }}" ><span class="count">
                            {{   App\Child::where('user_id',\Auth::user()->id)->count() }}
                        </span><p>Enfants inscrits</p></div>
                </a></div>
        </section>
    </div>
    <div class="col-md-4">
        <section class="panel bloc">
            <div class="panel-body">
                <a href="{{ action('AttendancesController@index') }}">
                    <div class="bloc_info"><img src="images/pointages.png" ><span class="count">

                         <?php 
$c = App\Child::where('user_id', \Auth::user()->id)->get();
if (!$c->isEmpty()) {
    echo App\Attendance::where('title', 'Absence')->whereRaw('EXTRACT(DAY FROM start) = ?', [\Carbon\Carbon::now()->day])->whereRaw('EXTRACT(YEAR FROM start) = ?', [\Carbon\Carbon::now()->year])->count();
}
?>
                        </span><p>Absents aujourd'hui</p></div></a>
            </div>
        </section>
    </div>
    @endif
    <div class="col-md-4">
        <section class="panel bloc horloge">
            <div class="panel-body">
                <?php 
/*setlocale(LC_ALL, 'fra_fra');
    $user = new App\User();