- Created SubmissionService to handle submission logic for assignments. - Added migrations for assignments and submissions tables. - Implemented AssignmentSeeder and SubmissionSeeder for initial data. - Updated DatabaseSeeder to include new seeders. - Enhanced app sidebar to include assignments navigation. - Developed datetime field component for better date and time input. - Created assignment management pages with data tables for assignments and submissions. - Implemented forms for creating and editing assignments and submissions. - Added routes for assignment and submission management in admin panel. - Defined types for assignments and submissions to improve type safety.
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Submission;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class SubmissionSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
Submission::insert([
|
|
[
|
|
'assignment_id' => 1,
|
|
'student_id' => 1,
|
|
'notes' => 'Sudah selesai, mohon direview',
|
|
'status' => 'submitted',
|
|
'submitted_at' => '2026-08-18 20:00:00',
|
|
'score' => 85,
|
|
'lecturer_feedback' => 'Bagus, tampilan rapi',
|
|
'created_at' => '2026-08-18 20:00:00',
|
|
'updated_at' => '2026-08-19 07:00:00',
|
|
],
|
|
[
|
|
'assignment_id' => 2,
|
|
'student_id' => 2,
|
|
'notes' => null,
|
|
'status' => 'not_submitted',
|
|
'submitted_at' => null,
|
|
'score' => null,
|
|
'lecturer_feedback' => null,
|
|
'created_at' => '2026-08-05 10:05:00',
|
|
'updated_at' => '2026-08-05 10:05:00',
|
|
],
|
|
]);
|
|
}
|
|
}
|