mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
event calendar
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Livewire\BitcoinEvent;
|
||||
|
||||
use App\Models\BitcoinEvent;
|
||||
use App\Models\Country;
|
||||
use Livewire\Component;
|
||||
|
||||
@@ -10,6 +11,27 @@ class BitcoinEventTable extends Component
|
||||
public Country $country;
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.bitcoin-event.bitcoin-event-table');
|
||||
return view('livewire.bitcoin-event.bitcoin-event-table', [
|
||||
'events' => BitcoinEvent::query()
|
||||
->get()
|
||||
->map(fn($event) => [
|
||||
'id' => $event->id,
|
||||
'startDate' => $event->from,
|
||||
'endDate' => $event->to,
|
||||
'location' => $event->title,
|
||||
'description' => $event->description,
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public function popover($content, $ids)
|
||||
{
|
||||
return to_route('bitcoinEvent.table.bitcoinEvent', [
|
||||
'country' => $this->country->code, 'table' => [
|
||||
'filters' => [
|
||||
'byid' => $ids,
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user