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:
25
app/Models/Application.php
Normal file
25
app/Models/Application.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\Career;
|
||||
|
||||
class Application extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'career_id',
|
||||
'name',
|
||||
'birthdate',
|
||||
'resume_file',
|
||||
'email',
|
||||
'phone_number',
|
||||
'cover_letter',
|
||||
];
|
||||
|
||||
public function career(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Career::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user