Patrick
Create images for multi page pdf spatie-laravel-media-library-plugin
Hi there,
I am using the spatie-laravel-media-library-plugin and its media conversions. I would like to create an image for each pdf page, but can't find a way to do so.
I checked the pdf-to-image package, but because my uploaded pdf is in the livewire-tmp folder, I can't access it via $pdf = new \Spatie\PdfToImage\Pdf($pathToPdf);
Any ideas? Thanks 🙂
2 replies
auth()->user() is NULL for loading custom assets with data
Hi there,
I am following this docs: https://filamentphp.com/docs/3.x/support/assets#registering-script-data
Have added my code to AppServiceProvider boot() method, but auth()->user() is always null.
Any ideas?
13 replies
How can I hide NaviationItems in custom NavigationGroup based on user role
Hi there,
As I am using getNavigationItems() it seems not possible? Or is there a way to hide each item based on a user role?
NavigationGroup::make()
->label(__('Reporting'))
->items([
...OrderReportingResource::getNavigationItems()->visible(auth()->user()->hasRole('OrderReportingUser')),
...OrderItemReportingResource::getNavigationItems(),
...ProductReportingResource::getNavigationItems(),
]),
11 replies
How to apply current filters to Columns using summaries?
HI there,
I am using sum() on TextColumn and Filter on relationships. But it seems the sum columns are not scoped by the filter? Is there any solution to this?
I can't find a hint in the documentation.
Appreciate your help. Thanks
3 replies
Resource vs Page for Stock Management & Reporting?
Hi there,
I am quite new to Filament and now have to build a Stock Management & Reporting view for my Products.
I am already have a Product Resource with view, edit, list, create pages.
I dont want to use the standard Product list page beacause the stock management is only for specific products and should only contain certain columns which are editable. Reports view contains all possible columns and makes use of Advanced Tables Plugin.
I am using Advanced Tables Plugin for my standard table views and would like to use it for reports too.
What would you recommend for my scenario? Creating a new Resource based on my Product Model und use its table integration, or create a page und use the table builder with a Livewire component?
Or I am totally wrong and there is a better solution?
Thanks! 🙂
2 replies
Repeater Items: Disable already added items after form saved in edit mode
Hi guys,
I can't find it in the documention. How can I disable editing of Repeater items after the form has been saved? I want the user only to be able to add & delete items after form save.
Thanks
9 replies
disableOptionWhen() method missing for Forms\Components\MorphToSelect\Type
Hi all,
how can I exclude already selected options from Forms\Components\MorphToSelect\Type in a Repeater ?
With the standard Select Field I have disableOptionWhen(), but it seems missing for MorphToSelect.
afterStateUpdated() seems also missing
Appreciate your help 🙂
1 replies
RelationManager shows "Class must be declared abstract or implement method 'getTableQueryForExport'"
In my RelationManagers my code editor shows "Class must be declared abstract or implement method 'getTableQueryForExport'". Never saw this before. Any ideas why?
9 replies
How to manipulate RelationManager query with laravel-adjacency-list tree() query?
Hi guys,
I am using the laravel-adjacency-list package to work with hierarchies in my models. In my ModelResource I manipulate the query with:
->modifyQueryUsing(function (Builder $query) {
return $query->tree()->orderBy('path');
})
and it works perfectly. However because the RelationManager has already a scope, the query manipulation is not working like this. Can anybody help me with the right manipulation to get the same tree() result in my RelationManager? Thanks1 replies
Best solution for dynamic Model attribute fields via Relationmanager
Hi all,
I am new to Filament and Laravel, trying to get the following working.
I have Tenant, CompanyGroup and CompanyGroupAttribute Model.
A Tenant should create CompanyGroupAttributes which should then act as Form Fields for CompanyGroup. So I have different CompanyGroupAttributes per Tenant. A CompanyGroup belongs to one Tenant and should have all related CompanyGroupAttributes.
The idea behind this is to provide custom attributes to each Tenant for their CompanyGroups.
What would be the best implementation for this?
Atm I have a belongsToMany relationship for CompanyGroup and CompanyGroupAttribute to have a pivot table to store the value for each custom attribute. However I am struggling to set the pivot table value on CompanyGroup creation in my CompanyGroupRelationManager.
I am sure I made a mistake choosing the wrong relations or missing a logic part.
Any ideas?
Appreciate your help 🙂 Thanks
4 replies