Like_vacancy.php 476 Bytes
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Like_vacancy extends Model
{
    public $table = 'like_vacancy';

    public $fillable = [
        'code_record',
        'user_id'
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function vacancy(): BelongsTo
    {
        return $this->belongsTo(Ad_employer::class);
    }
}