Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameters are not accessible in the mount method #4

Open
khurrambaig007 opened this issue Oct 21, 2022 · 0 comments
Open

parameters are not accessible in the mount method #4

khurrambaig007 opened this issue Oct 21, 2022 · 0 comments

Comments

@khurrambaig007
Copy link

hi, I am trying to pass the parameters to the modal, but in mount method of modal component I get the following error

Illuminate\Contracts\Container\BindingResolutionException
Unable to resolve dependency [Parameter #0 [ $args ]] in class App\Http\Livewire\Contact\EditModel (View: D:\laragon\www\sms-livewire\vendor\devsrv\livewire-modal\resources\views\livewire\modal.blade.php)

<x-livewiremodal-trigger class="btn" title="Edit Contact" modal="contact.edit-model" :args="['id' => '{{ $chat_list_id }}']"> <i class="fa-solid fa-user-pen fa-xl"></i> </x-livewiremodal-trigger>

and in my EditModel Component class in mount method i am accept the $args parameter

public function mount($args){ dump($args); }

please help me with this issue.

Regards

@khurrambaig007 khurrambaig007 changed the title parameters are not accessible in mount method parameters are not accessible in the mount method Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant