ddoddsr
When dispatching a job and passing a model ... Is model beibng create or Update
I am passing the $record to the job but how do I know if it is a new record or an update?
But is there a method that tells me if a record is newly created?
\App\Jobs\AirtableSync::dispatch($record);
in job:
I could pass a value for example $is_newBut is there a method that tells me if a record is newly created?
11 replies
Add laravel-comments to a RelationManager.
I followed the talk that Dan Harrin and Freek had about two years ago about Spaties laravel-comments in Filament v2. Also saw the v2 trick for this.
I made changes to the examples to make it work on FilamentV3 and I made some real progress, showing thc comments connected to a
Resource
with a widget. There is also a CommentsResource which I have add will upon request.
However, now I need the Comments on a RelationManager
and don't see how to get the Widget working on a RelationManager.
Given the simplicity of the Widget what can I do with a page or livewire component?
This is a paid plugin so no channel?
install laravel-client and the livewire plugin
In App\Providers\AppServiceProvider. boot method
Then in the model
Widget
widgit view
All of the above works in a resource when I add the widget to getWidgets()
This does not work in the RelationManager getFooterWidgets()
Or getWidgets()
3 replies
How Add a widget to relationManager form
Is there a way to add a widget to the forms of a RelationManager?
I have attached a widget to a resource form through the EditPage:
This works so I added this method to the RelationManager.
no error and no widget.
Looking in Filament
RelationManager.php
there is no mention of widgets like there is in Resource.php
.
So what to try next?7 replies
to update a field in one livewire component from another lw component.
I structured a form with Splits and Sections to make the layout I want. ( I'm sure there are other better ways to do that.)
These call Livewire:make(..) and all is mostly nice looking for my purposes.
I would like an action in one livewire component to update a textbox in another livewire component.
Is this the job of $set() & $get()?
$livewire? I dd($livewire) and everything must be in there...
I see the keys I have assigned to various components, so I must be able to access and set them.
What must I do to assign a value to a field with a specfic key in another component?
3 replies
poll() discards mount data
Appears that adding poll() to the table causes the the $record in mount to become null after about 2s. The table rows are shown then after about 2s it throws an error.
At first I thought it was the Poll nterval but then changed it to a longer value and the error still happens after 2s. When both the
Attempt to read property "id" on null
At first I thought it was the Poll nterval but then changed it to a longer value and the error still happens after 2s. When both the
->where('campaign_contact_id', $this->record->id )
and poll(2)
there is an error.
Without one or the other, no error
5 replies
How to open custom page from relation manager
I can open page from a resource row with an Action in and
But how to do this in ResourceManager?
I want to open a Custom page from an action in in the InboxRelationManager which is on the Client.
and . and I get error
and . and I get error
\InboxRelationManager::getUrl does not exist
5 replies
export successful no notification
I am running a bulk action export and the process ends with a promise of a download notification and download link.
The data shows up in
storage/app/public/filament_exports/
But the notification never comes.
The data in the notification table row data:
I get other notifications why not these?3 replies
modifyQueryUsing ->join changes $record->id
Building a Dashboard widget to display Team Notes.
Works except using join or leftJoin changes $record->id from the original query table to the "joined" table.
I want to use the original table id for a link to the record and it changes to the id of the "joined' table .
6 replies
npm run build error, run dev not working
Followed the directions I made a new theme
Followed these steps
Run build does include my custom page and the tailwind class take effect! great.
But I get a warning that does not make sense:
Also npm run dev does NOT effect my custom page changes
Gist of files https://gist.github.com/ddoddsr/f777762adb35c1908546ce98a1d1e3b5
25 replies
summarize calculated fields in footer
How can I add a custom calculation to the footer of a grouped table?
These three columns show up great for each row and the footer group summarize works for the first two.
Just cannot figure out the summarize for the third calculated column...
Trying a custom summarizer:
With this I get an error:
14 replies
Get filter by date, using the table date as the options
Table has a report_week, which is the same for several records, the day the report ran.
I can get a list of distinct values for the options but I cannot see how to adjust the query with that data.
This gives me a set of report weeks to select.
How do I use this in the $query?
16 replies