Markwowz
Markwowz
FFilament
Created by Markwowz on 8/1/2024 in #❓┊help
ExportAction on Row to export another model with HasMany relationship
Hi there, I am trying too add an export action to the end of my row and has it export the related model. I have a resource that shows all my Posts and at the end of each row i want to have an option to export the comments from that post. The post has a HasMany relationship to the comments. I have a resource for Comments but it shows all the comments for all the posts because from a moderation perspective makes less sense to have to click into everyone post through a relationship manager to approve comments. I was able to export all the Comments through that Resource without any issue. Just want to add it to the Post Resource to to grab only for each post. Thanks!
2 replies
FFilament
Created by Markwowz on 2/20/2024 in #❓┊help
Custom Table Widget
Hi Folks, I am creating a table widget where I want the columns to be all the Products and then the y axis to the be the Quarters. So it would show how many products where sold in each quarter with a total count at the very bottom. The relationships are in place where I should be able to pull in the data for sales per quarter Product->sales($quarter), but i cant figure out how to correctly pull in the columns as all the products and set the rows as q1, q2, q3, q4. Is this do able with table builder or is there is a better way I should be achieving this kind of a layout? I figure this something people are often doing so it shouldn't be too hard, but maybe I'm overcomplicating it myself. Thanks!
13 replies
FFilament
Created by Markwowz on 2/13/2024 in #❓┊help
Unable to override primary color on custom theme
Hi Folks, I am missing something here. I have created a custom theme and applied a few styles which I see are appearing as expected, but I am trying to override the var for primary-50 and it does not change. I can see in :root it is still showing the original color. Here is what I have in the tailwinds config for my custom theme: import preset from '../../../../vendor/filament/filament/tailwind.config.preset' export default { presets: [preset], content: [ './app/Filament//*.php', './resources/views/filament//.blade.php', './vendor/filament/**/.blade.php', ], theme: { extend: { colors: { primary: { 50: '#479e58', 600: '#479e58', }, custom: { 500: '#02911e', 600: '#479e58' }, } }, }, } Is this the correct way I should be overriding the colors or is there a better approach? Thanks!
4 replies
FFilament
Created by Markwowz on 1/11/2024 in #❓┊help
Display TextColumn based on model function
What is the best apporach for displaying a TextColumn in my table that references a function on my model? I currently have a Model called Ticket which has a function called remaining() which returns the remaining quantity of the ticket as an integer.
7 replies
FFilament
Created by Markwowz on 10/5/2023 in #❓┊help
Adding Header Action to a resource
I see the option to add it on resource pages, but I just want it to appear on top next to the "New whatever" button. I tried getHeaderActions() on my WhateverResource.php and it doesnt seem to add the link.
13 replies
FFilament
Created by Markwowz on 10/4/2023 in #❓┊help
SAML to Login User
Hi Folks, I am new to Filamentphp and i have to say I already love it. I converted one of our internal tools over to it and the one issue I am running into is getting the user signed in after we get the return for Okta. In our previous laravel project I was just using Auth::login($user) and it would work, but now when I do this I get redirected back to the admin dashboard and get a forbidden page. It is successfully creating the user, just doenst appear to be creating their session correctly. Is there a different approach I should be using to login the user when it comes to Filament?
11 replies