headbanger
listener not working via echo
I've a custom page in filament whose view is here:
I am successfully able to dispatch an event CustomerAskedQuestion using laravel event. But I am not able to listen to it in this above mentioned filament custom page view file, neither in the class file like below:
I get Laravel Echo not found error, not sure what should I do to mitigate this error? Noob question I believe?
3 replies
form field not resetting + update data
1. How can I reset the value of replyMessage field? $set , $this->form->fill(); $this->reset('replyMessage') - all 3 are not working when written above halt() and anything written after halt doesnt get executed.
2. This custom view (filament.chat-messages.chats), loads the chat message of a user & admin. I am dispatching an event from livewire from the frontend, how can I listen to that event of a new message so that the messages get updated in this modal?
1 replies
Filament event listener?
I have a frontend which dispatches an event. I want to be able to listen to that event inside filament and if the user has opened a specific modal then the data inside that modal should be updated using laravel echo. Can I achieve this? I can't find a way to even begin with this, where should I begin looking?
1 replies
import with belongstomany fields
I have the following fields that the user has to add for the csv upload:
- first_name
- last_name
- email
- role
- company name
I want to updateOrCreate name and email in the users table while I want to attach role and company to the newly created / existing user.
I am trying to achieve this with the following:
But the user is not persisting and hence the afterSave is also not working. So all in all, both resolverecord and aftersave, both are not working.
What am I doing wrong?
1 replies
How to import belongsToMany fields in the filament importer?
The getColumns() has the 3 users table fields on the top followed by the related user_company (pivot table) fields i.e. company_employee_id and company_employee_budget allong with the company name from the companies table commented out.
How to I ensure that I am able to add a user and then find the company by name and attach that company with the newly inserted or updated user?
7 replies
Filament: Change default table names for imports
0
I want to use the import records functionality mentioned here: https://filamentphp.com/docs/3.x/panels/resources/creating-records#importing-resource-records
Although, I want to prefix the tables used in the import functionality in filament:
- job_batches -> mvl_job_batches
- notifications -> mvl_notifications
- imports -> mvl_imports
- failed_import_rows -> mvl_failed_import_rows
- Also, the user_id columns in these tables needs to change -> mvl_user_id
As of now I've tried everything mentioned here https://laracasts.com/discuss/channels/filament/import-record-change-table-names?page=1&replyId=920681 . But I get an error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.imports' doesn't exist
What all changes I need to make in order for the import to work successfully.
2 replies