Panda
How to edit resource properties on simple resource creation?
Hi, I'm trying to mutate the data before resource creation on a simple resource using the documented method but the method is not being called, also the create another button cannot be disabled in simple resource creation model.
4 replies
Discovering resources and pages in custom modules
I'm working on a project which divides each feature into modules like user module, post module, etc. I want to place my Filament resources and pages under relevant module's directories like
modules/User/app/Filament
and modules/Post/app/Filament
etc.
Is it possible to do so, and if yes then how can I do this? Any guidance would be much appreciated.1 replies
Get URL for record in relation manager
Is it possible to generate URL for relation manager item? I have a shop resource which has a shop items relation manager. I'm showing the name of purchased item in order resource's table and want to add a link to the shop item.
2 replies
Place resources other than App\Filament\Resources
I was watching the Modular Laravel series on Laracasts and want to move my resources into their relevant modules. Is there any option in Filament to achieve this architecture?
3 replies
How to add custom (non-stat, non-chart) widget in dashboard?
Hi, I've recently updated the privacy and terms content in my site and I want to show an alert banner with a custom action button in dashboard for non-admin users. I've seen the Filament documentation but there are examples of stat and chart widgets only. Can anyone please guide me on how to add such a widget/element on dashboard?
5 replies
SPA mode crashing styles when navigating to non Filament routes
I've created a custom navigation like using the following snippet but when I click on it my site's styles are totally ruined (I'm using TailwindCSS) and when I navigate back to the dashboard it also gives issues.
Even the open in new tab dosen't work when using SPA mode.
2 replies
Custom properties on Create Page causes 404
I'm passing the parent ID as route parameter and want to save it into a custom property named
$series
on the page but when I define the property on the CreatePage
component it triggers a 404 error, when removed it works fine.
So, I cannot define custom livewire state on my page or am I missing something?
1 replies
Passing parent model to a child resource's create page
I have a
SeriesResource
with a ChapterRelationManager
and I want to create chapters in that series but the chapter has too many fields and I want a separate page for creating and editing chapter that's why I created a ChapterResource
.
I can easily link the create and edit button on ChapterRelationManager
table to ChapterResource
's create
and edit
pages but I'm having trouble passing the Series
to the create
page of ChapterResource
as the Chapter
belongs to a Series
and I must need the series record in order to create the chapter.
Any help would be appreciated.3 replies
How to delete [index] resource page?
I have a resource named
SeriesResource
for which I only want the view
page as create
and edit
operations are handled via parent's ResourceManager
. When I remove the index
entry from the getPages
of the resource, it throws the following error.
Following is the code for my SeriesResource
6 replies
Is it possible to modify the aggregation column query?
I am currently loading the sum of
amount
field from transactions
relation on my CoinsPack
model using the following code. The Transaction
has a status
field which can be either pending
, cancelled
and successful
and I want the sum of amount
column for only successful transactions.
7 replies
Is it possible to disable the resource index page?
I am working on a novel reading app where a novel can have many series and a series can have many chapters. I've structured my app in the following way.
1. The
NovelResource
has a relation manager with Series
where I've only added a custom view action which redirects the user to filament.admin.resources.series.view
route when clicked and passes the model ID as route parameter.
2. I've created a SeriesResource
with only view
and edit
page and removed the create
and index
entries from the getPages
function in SeriesResource
. I've also hidden the resource from navigation by setting $shouldRegisterNavigation
to false
on the SeriesResource
3. When user is redirected to the series view page (filament.admin.resources.series.view
) it throws an error saying the route filament.admin.resources.series.index
is not defined. I do not want this page to be created or accessible by anyone because user will list the Series
via NovelResource
's SeriesRelationManager
and cannot directly access the main page.
4. How can I completely disable the index
route for SeriesResource
? I know it uses the index
page link in breadcrumb and the Cancel button but I want to change it to the parent novel page.
Any help would be much appreciated.7 replies