31 lines
523 B
PHP
31 lines
523 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class UserSavedJob extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'user_id',
|
||
|
|
'job_id',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the user who saved the job.
|
||
|
|
*/
|
||
|
|
public function user(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(User::class);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the saved job.
|
||
|
|
*/
|
||
|
|
public function job(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Job::class);
|
||
|
|
}
|
||
|
|
}
|