Enhance internship application process: update InternshipsPageController to retrieve internships and validate application submissions, modify Internship model to include relationships, and implement dynamic application modals in views for internships and careers. Update Livewire configuration for improved file upload handling.
This commit is contained in:
1 parent
9603402fee
commit
f6ddf1d9c1
18 files changed
+986
-119
No files matched your search
@@ -3,8 +3,26 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use App\Models\InternshipApplication;
|
||||
|
||||
class Internship extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'title_description',
|
||||
'salary_per_month',
|
||||
'bullets',
|
||||
'location',
|
||||
'salary_currency',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'bullets' => 'array',
|
||||
];
|
||||
|
||||
public function applications(): HasMany
|
||||
{
|
||||
return $this->hasMany(InternshipApplication::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class InternshipApplication extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'internship_id',
|
||||
'name',
|
||||
'birthdate',
|
||||
'resume_file',
|
||||
'email',
|
||||
'phone_number',
|
||||
'cover_letter',
|
||||
];
|
||||
|
||||
public function internship(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Internship::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user