The "eloquent" way to do it would be in your Employee model to set up the relationship between Employees and Holidays :
public function holidays() {
return $this->hasMany(Holiday::class);
}
and then in your Holiday model set up the reverse :
public function employee() {
return $this->belongsTo(Employee::class, 'created_by');
}
Note that we're having to pass over the name of the foreign key explicitly as it's not what Laravel is expecting (employee_id).
Then you can just load your Employee :
$emp = Employee::where('user_id', $user->id)->first();
and then access their holidays :
$holidays = $emp->holidays;
or :
$lastfiveholidays = $emp->holidays()->take(5);
where('holidays.created_by', '=', $emp->id), becauseholidays.idshould be unique, not tied back to the employee id.