id(); $table->foreignId('category_id')->constrained()->cascadeOnDelete(); $table->string('slug')->unique(); $table->string('title'); $table->string('sub')->nullable(); $table->text('desc'); $table->longText('long_desc'); $table->string('duration'); $table->unsignedInteger('students')->default(0); $table->decimal('rating', 2, 1)->default(5.0); $table->string('badge')->nullable(); $table->string('image')->nullable(); $table->string('price')->nullable(); $table->json('includes')->nullable(); $table->json('requirements')->nullable(); $table->string('meta_title')->nullable(); $table->text('meta_description')->nullable(); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('courses'); } };