<?php

namespace App\Services;

use App\RoomCount;
use App\RoomType;

class PlanningService
{
    public function room($roomTypeArray)
    {
        $room = RoomCount::query()->pluck('count', 'id');
        $roomCounts = array_intersect($room->toArray(), $roomTypeArray);

        return $roomCounts;
    }

    public function roomType($roomTypeArray)
    {
        $roomTypeCollection = RoomType::query()->pluck('code');
        $roomTypes =  array_intersect($roomTypeCollection->toArray(), $roomTypeArray);

        return $roomTypes;
    }
}
