Enhance careers management features: update CareersPageController to fetch and display career listings with additional fields, modify Career model to include relationships and new attributes, and create a new view for the careers index with an application modal. Update database migration to reflect changes in the careers table structure and adjust routes for application submissions.

This commit is contained in:
2025-07-29 00:23:08 +05:00
parent 9b3ca3ff66
commit a89e2a71d8
15 changed files with 535 additions and 11 deletions

View File

@@ -14,9 +14,10 @@ return new class extends Migration
Schema::create('careers', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('description');
$table->text('title_description')->nullable();
$table->string('salary_per_month')->nullable();
$table->json('bullets')->nullable();
$table->string('location');
$table->string('salary')->nullable();
$table->timestamps();
});
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('applications', function (Blueprint $table) {
$table->id();
$table->foreignId('career_id')->constrained()->onDelete('cascade');
$table->string('name');
$table->date('birthdate');
$table->string('resume_file');
$table->string('email');
$table->string('phone_number');
$table->text('cover_letter')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('applications');
}
};