27 nov 2023
Cette révision appartient à :
Parent
ac63da709e
révision
7b2189b781
@ -104,7 +104,8 @@ public function update(Request $request, $id)
|
||||
$course->price = $request->coursePrice;
|
||||
$course->subscription_price = $request->subscriptionPrice;
|
||||
$course->difficulty = $request->courseDifficulty;
|
||||
$course->prerequisites = $request->prerequisites;
|
||||
$course->prerequisites_en = $request->prerequisites_en;
|
||||
$course->prerequisites_bn = $request->prerequisites_bn;
|
||||
$course->status = $request->status;
|
||||
$course->language = 'en';
|
||||
|
||||
|
||||
@ -13,7 +13,15 @@ public function up(): void
|
||||
{
|
||||
Schema::create('reviews', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('student_id')->index();
|
||||
$table->unsignedBigInteger('course_id')->index();
|
||||
$table->integer('rating');
|
||||
$table->text('comment')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('student_id')->references('id')->on('students')->onDelete('cascade');
|
||||
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,18 @@ public function up(): void
|
||||
{
|
||||
Schema::create('payments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('student_id')->index();
|
||||
$table->unsignedBigInteger('course_id')->index();
|
||||
$table->decimal('amount', 10, 2)->nullable(false);
|
||||
$table->timestamp('payment_date')->useCurrent();
|
||||
$table->string('payment_method');
|
||||
$table->string('transaction_id');
|
||||
$table->enum('status', ['success', 'pending', 'failed'])->default('pending');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('student_id')->references('id')->on('students')->onDelete('cascade');
|
||||
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,17 @@ public function up(): void
|
||||
{
|
||||
Schema::create('subscriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('student_id')->index();
|
||||
$table->unsignedBigInteger('course_id')->index();
|
||||
$table->enum('plan', ['monthly', 'yearly'])->nullable(false);
|
||||
$table->timestamp('start_date')->useCurrent();
|
||||
$table->timestamp('end_date')->nullable();
|
||||
$table->enum('status', ['active', 'canceled', 'expired'])->default('active');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('student_id')->references('id')->on('students')->onDelete('cascade');
|
||||
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,18 @@ public function up(): void
|
||||
{
|
||||
Schema::create('progress', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('student_id')->index();
|
||||
$table->unsignedBigInteger('course_id')->index();
|
||||
$table->integer('progress_percentage')->default(0);
|
||||
$table->boolean('completed')->default(false);
|
||||
$table->unsignedBigInteger('last_viewed_material_id')->index()->nullable();
|
||||
$table->timestamp('last_viewed_at')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('student_id')->references('id')->on('students')->onDelete('cascade');
|
||||
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
|
||||
$table->foreign('last_viewed_material_id')->references('id')->on('materials')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,15 @@ public function up(): void
|
||||
{
|
||||
Schema::create('discussions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id')->index();
|
||||
$table->unsignedBigInteger('course_id')->index();
|
||||
$table->string('title', 255)->nullable(false);
|
||||
$table->text('content');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('course_id')->references('id')->on('courses')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,14 @@ public function up(): void
|
||||
{
|
||||
Schema::create('messages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('sender_id')->index();
|
||||
$table->unsignedBigInteger('receiver_id')->index();
|
||||
$table->text('content');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('sender_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('receiver_id')->references('id')->on('users')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
<ul class="list-group mb-3 list-group-flush">
|
||||
<li class="list-group-item px-0 d-flex justify-content-between">
|
||||
<span>Difficulty</span>
|
||||
<strong>{{ $d->difficulty == 'beginner' ? __('Beginner') : ($d->gender == 'intermediate' ? __('Intermediate') : __('Advanced')) }}</strong>
|
||||
<strong>{{ $d->difficulty == 'beginner' ? __('Beginner') : ($d->difficulty == 'intermediate' ? __('Intermediate') : __('Advanced')) }}</strong>
|
||||
</li>
|
||||
<li class="list-group-item px-0 d-flex justify-content-between">
|
||||
<span class="mb-0">Instructor :</span>
|
||||
|
||||
Chargement…
Référencer dans un nouveau ticket
Block a user