PHP code example of sagor110090 / livewire-modal
1. Go to this page and download the library: Download sagor110090/livewire-modal library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sagor110090 / livewire-modal example snippets
namespace App\Livewire;
use App\Models\User;
use Livewire\Component;
class EditUser extends Component
{
public $user;
public function mount($id)
{
$this->user = User::find($id);
}
public function render()
{
return view('livewire.edit-user');
}
}
blade
<!-- resources/views/livewire/edit-user.blade.php -->
<div>
<h2>Edit User: {{ $user->name }}</h2>
<!-- Your form or content here -->
</div>