ChickenDev
Importer RowImportFailedException
I've created an importer that is supposed to bail if it encounters references to data that doesn't exist in my database.
However, when I run a test using a CSV with 1 valid row and 1 invalid row, the exception is thrown but the importer then ends up in an infinite loop and I get multiple copies of the valid row imported until I kill the queue.
Here's my
resolveRecord
function that is intended to throw the exception:
The exception gets logged in my laravel.log file, but I do not see any results in the UI for the import.3 replies
Action in Sub Navigation
Is it possible to add an Action component to a sub-navigation for a page.
I have a cluster with the sub-navigation showing just fine. What I would like is to add the "Create" action (preferably styled as a button) below each item in the sub-navigation.
I currently have the following code in my page component as a proof of concept:
The "NavigationItem" to google works just fine, but I get the following error when I try to add the action:
Method Filament\Actions\CreateAction::isActive does not exist.
I assume this is because the Action does not extend NavigationItem or Component. Is there some way I can accomplish this? I can, of course, add a NavigationItem to the create/edit URLs manually, but I'd rather be able to use something that would auto-generate the correct URLs.1 replies
ImageEntry src URL
I have a database column that contains a relative URL that, depending on context, needs to have a different domain and path prepended to it.
For example,
the DB column value is
/bysZeUvSPZPJnku4qkHF34CdgMG.jpg
and the same filename is used for a thumbnail using the https://domain.com/w/100
prefix and for the main image using the https://domain.com/w/500
prefix.
How can I prepend these values to the ImageEntry component?
I have tried creating a special disk inside filesystems.php
using the following config
but when I use it in the component the src
attribute of the img
tag is not set.7 replies
How do I change Button Colors?
How do I set my button colours using the Tailwind CSS configuration? I've created a custom theme and set a new set of CSS variables for the colours I want to substitute for "primary" in tailwind using the pattern
--curiousblue-x
However, no matter how I update the new theme.css file and the tailwind.config.js file, the buttons remain the same colour.
When I look at the button in the DOM inspector it has inline styles:
I can force the colours to change by overriding --primary-x
inside my theme.css file, but this seems a little clunky since it seems to be ignoring the tailwind configuration. Is this the best I can do, or is there a cleaner way to achieve what I'm looking for.
Here's my theme.css:
My Tailwind config is attached.
This is possibly a pretty basic question since but I've been out of the PHP/HTML/CSS space for a long time (probably since about PHP v5.6) and a lot has changed!4 replies