classify admin
This commit is contained in:
42
app/Models/JobApplication.php
Normal file
42
app/Models/JobApplication.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class JobApplication extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $fillable = [
|
||||
'item_id',
|
||||
'user_id',
|
||||
'recruiter_id',
|
||||
'full_name',
|
||||
'email',
|
||||
'mobile',
|
||||
'resume',
|
||||
'status',
|
||||
];
|
||||
|
||||
public function item()
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
public function recruiter()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
public function getResumeAttribute($image) {
|
||||
if (!empty($image)) {
|
||||
return url(Storage::url($image));
|
||||
}
|
||||
return $image;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user