PHP code example of mozhuilungdsuo / livewire-bootstrap-modal
1. Go to this page and download the library: Download mozhuilungdsuo/livewire-bootstrap-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/ */
mozhuilungdsuo / livewire-bootstrap-modal example snippets
namespace App\Http\Livewire\Users;
use App\Models\User;
use Livewire\Component;
class Update extends Component
{
public $user;
public function mount(User $user)
{
$this->user = $user;
}
public function render()
{
return view('users.update');
}
}
public function save()
{
$this->validate();
// save the record
$this->dispatch('hideModal');
}
console
php artisan vendor:publish --tag=livewire-bootstrap-modal:views