Khởi tạo dữ liệu ban đầu:

Dữ liệu ban đầu được khởi tạo bằng các file seeder:

Ví dụ:

File SubjectTableSeeder:

DB::table('uet_subjects')->insert(
            [
                [
                    'name' => 'Mạng máy tính',
                    'user_id'=>1,
                    'created_at' => new DateTime()
                ],
                [
                    'name' => 'Nguyên lí hệ điều hành',
                    'user_id'=>1,
                    'created_at' => new DateTime()

                ],
                [
                    'name' => 'Toán rời rạc',
                    'user_id'=>1,
                    'created_at' => new DateTime()

                ]
            ]
        );

File TestTableSeeder:

DB::table('uet_tests')->insert(
            [
                [
                    'name'=>'Môn mạng máy tính: Đề số 1',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 1'),
                    'subject_id'=>1,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn mạng máy tính: Đề số 2',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 2'),
                    'subject_id'=>1,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn mạng máy tính: Đề số 3',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 3'),
                    'subject_id'=>1,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn mạng máy tính: Đề số 4',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 4'),
                    'subject_id'=>1,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn Nguyên lí hệ điều hành: Đề số 1',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 1'),
                    'subject_id'=>2,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn Nguyên lí hệ điều hành: Đề số 2',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 2'),
                    'subject_id'=>2,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn Nguyên lí hệ điều hành: Đề số 3',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 3'),
                    'subject_id'=>2,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ],
                [
                    'name'=>'Môn Nguyên lí hệ điều hành: Đề số 4',
                    'slug'=>str_slug('Môn mạng máy tính: Đề số 4'),
                    'subject_id'=>2,
                    'created_at'=> new DateTime(),
                    'user_id'=>1
                ]
            ]
        );

File UserTableSeeder:

DB::table('uet_users')->insert(
            [
                [
                    'name'=>'Lương Văn Quý',
                    'email'=>'[email protected]',
                    'password'=>bcrypt('12345'),
                    'level'=>1,
                    'created_at'=>new DateTime(),
                ],
                [
                    'name'=>'Lương Văn Quý',
                    'email'=>'[email protected]',
                    'password'=>bcrypt('12345'),
                    'level'=>1,
                    'created_at'=>new DateTime(),
                ]
            ]
        );

Đánh giá của người dùng:

Dữliệu Google Ananlytics

Dữ liệu Google Ananlytics:

results matching ""

    No results matching ""