class AvailableRooms extends Component implements HasTable, HasForms
{
use InteractsWithTable;
use InteractsWithForms;
public $availableRoomID = [];
#[On('availableRoom')]
public function index($available_room_id){
$this->availableRoomID = $available_room_id;
}
function table(Table $table): Table
{
return $table
->query(Room::whereIn('id', $this->availableRoomID))
->columns([
TextColumn::make('room_name'),
TextColumn::make('room_type'),
]);
}
public function render()
{
return view('livewire.available-rooms');
}
}
class AvailableRooms extends Component implements HasTable, HasForms
{
use InteractsWithTable;
use InteractsWithForms;
public $availableRoomID = [];
#[On('availableRoom')]
public function index($available_room_id){
$this->availableRoomID = $available_room_id;
}
function table(Table $table): Table
{
return $table
->query(Room::whereIn('id', $this->availableRoomID))
->columns([
TextColumn::make('room_name'),
TextColumn::make('room_type'),
]);
}
public function render()
{
return view('livewire.available-rooms');
}
}