54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
DB::table('users')->insert([
|
|
'name' => 'admin',
|
|
'surname' => 'main',
|
|
'email' => 'admin@admin.com',
|
|
'password' => bcrypt('pass1234'),
|
|
'is_Admin' => true
|
|
]);
|
|
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
|
|
]);
|
|
}
|
|
}
|