2019-11-18 18:33:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Seed the application's database.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
2019-11-30 21:32:42 +01:00
|
|
|
DB::table('users')->insert([
|
|
|
|
'name' => 'admin',
|
|
|
|
'surname' => 'main',
|
|
|
|
'email' => 'admin@admin.com',
|
|
|
|
'password' => bcrypt('pass1234'),
|
|
|
|
'is_Admin' => true
|
|
|
|
]);
|
2019-12-01 19:31:49 +01:00
|
|
|
DB::table('users')->insert([
|
|
|
|
'name' => 'test',
|
|
|
|
'surname' => 'user',
|
|
|
|
'email' => 'test@test.com',
|
|
|
|
'password' => bcrypt('test1234'),
|
|
|
|
'is_Admin' => false
|
|
|
|
]);
|
|
|
|
|
|
|
|
$this->call([
|
|
|
|
RoomsTableSeeder::class,
|
|
|
|
]);
|
|
|
|
|
|
|
|
DB::table('subjects')->insert([
|
|
|
|
'name' => 'Systemy Informatyczne UA0',
|
|
|
|
'type' => 'Excercises',
|
|
|
|
'weekday' => 'Monday',
|
|
|
|
'time' => '17:15',
|
|
|
|
'room_id' => 1,
|
|
|
|
'user_id' => 2
|
|
|
|
]);
|
|
|
|
DB::table('classes')->insert([
|
|
|
|
'subject_id' => 1,
|
|
|
|
'date' => '2019-12-02',
|
|
|
|
]);
|
|
|
|
DB::table('attendances')->insert([
|
|
|
|
'classes_id' => 1,
|
|
|
|
'student_id_number' => '416010',
|
|
|
|
'student_name' => 'Joanna',
|
|
|
|
'student_surname' => 'Paliwoda',
|
|
|
|
'seat_number' => 13
|
|
|
|
]);
|
2019-11-18 18:33:29 +01:00
|
|
|
}
|
|
|
|
}
|