Skip to content

Instantly share code, notes, and snippets.

View denizozturk's full-sized avatar
🐙

deniz öztürk denizozturk

🐙
View GitHub Profile
@denizozturk
denizozturk / livewire-select2-blade.php
Last active August 29, 2022 10:03
Select2 example with Livewire
<!-- Make sure jquery.js, Select2.js and Select2.css files are included (in master.blade.php or another template file) -->
<div>
<div wire:ignore>
<select class="select_country" wire:model="country">
<option value="" disabled>Please select the country</option>
@isset($this->countries)
@foreach(json_decode(json_encode($this->countries)) as $country)
<option value="{{ $country->code }}">{{ $country->name }}</option>
<?php
/**
* Access/modify any instance private property.
*/
class Invade
{
public function __construct(
protected $instance,
protected $setter,