You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
namespace App\Http\Livewire\User;
use App\Models\Role;
use App\Models\User;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log;
use LivewireUI\Modal\ModalComponent;
class UserEdit extends ModalComponent
{
public User | int $user;
public function mount(User $user)
{
$this->user = $user;
}
public function render(): Factory|View|Application
{
Log::debug($this->user);
$roles = Role::all();
return view('livewire.user.user-edit', ['roles' => $roles]);
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I have a problem. When I'm open a modal form is not have data i.e user name.
In Log file I see that in mount method object is correct.
user-edit.blade.php
In Livewire class I have:
EditUser.php
Beta Was this translation helpful? Give feedback.
All reactions