Matteo G
Explore posts from serverskey-value and json arrays: {closure}(): Argument #1 ($value) must be of type ?string, array given
Hey all,
I'm working on an admin section for my portfolio page.
The data is from a bunch of Markdown files with some frontmatter; this frontmatter has been converted and stored as json in a sqlite database. When editing the Project, I chose to display the frontmatter with a KeyValue form component. After trying to save an instance without changing the values (meaning they should be valid), I get the following error:
Could it be that an array value is incompatible with the KeyValue component? Or am I doing something wrong ?
35 replies
Getting owner record in custom association action
Hello all,
I have a book and story tables with a pivot table between the two. I have relationship manager to handle associating and dissociating books and stories. But the pivot table also has other data that needs to be entered when creating an association (order).
So I have overridden the form for the associate action like so:
I am now trying to save all this stuff, but I cannot seem to retrieve the Book I'm currently editing inside the action. Is there a way to do so?
4 replies
Custom Pages and Widgets without resources
Hello everyone,
I'm rebuilding my new Portfolio in Laravel and would like to keep my collection of md articles without having to store them in a database. I'd like to have some data in a filament admin section (alongside other data) and be able to do basic CRUD operations on those articles. Is there a way to do so and have some widgets (like a count or else) using this data (kind of like a custom Resource) or do I have to do everything manually ?
Don't know if I explained myself correctly, but hopefully someone can help me ?
5 replies
Relation Manager and HasManyThrough: General error: 1 no such column on one of the models
Hello everyone,
I'm building a library management system using filament and I'm trying to add relation manager to handle the intermediate tables that I need but I must be doing something wrong...
The error message is:
SQLSTATE[HY000]: General error: 1 no such column: chapters.chapter_story_id
I have a Chapter defined like this:
migration:
model:
And a Story defined like this:
migration:
model
And I have an intermediate table called ChapterStory:
migration:
model:
I haven't modified the relation manager:
Am I doing something wrong ?6 replies
Saving Optional Relationship to db does not persist
Edit: This is not solved, only halfway there :(
Hey all,
I've been trying my hand at Laravel and filament for the last couple of weeks and am stuck on something:
I have two entities, Book and BookPoster. Both have their foreign_key value set as nullable (because a book might not have a poster at creation).
The BookResource's form looks as follows:
When selecting a BookPoster from the list, the value does not get persisted in database. Do you know what I might be doing wrong?
33 replies
CDCloudflare Developers
•Created by Matteo G on 8/24/2023 in #general-help
Routing subdomain to path on main domain
Hello all,
I am trying to modify a cname record for one of my domains. I would like to have blog.example.com redirect to example.com/blog. I think I should be able to do so using DNS, right ?
2 replies