This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // In the Post model | |
| class Post extends Model | |
| { | |
| public function user() | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Livewire; | |
| use App\SOSC\Models\User; | |
| use Illuminate\Contracts\Foundation\Application; | |
| use Illuminate\Contracts\View\Factory; | |
| use Illuminate\Pagination\Paginator; | |
| use Illuminate\View\View; | |
| use Livewire\Component; |