Jean-Loup
Jean-Loup
FFilament
Created by Jean-Loup on 4/29/2025 in #❓┊help
Year data type
Ok so as it turns out casting to 'datetime:Y' is what was causing the issue. Remove the cast and the data displays correctly
13 replies
FFilament
Created by Jean-Loup on 4/29/2025 in #❓┊help
Year data type
Yeah well I already had it cast as 'datetime:Y' and just changed it to 'date:Y' but in both cases it sees it as a timestamp which makes no sense so I guess I'll just use an integer...
13 replies
FFilament
Created by Jean-Loup on 4/29/2025 in #❓┊help
Year data type
I'm still confused how I can cast a Carbon object. Which method do I use under TextColumn?
13 replies
FFilament
Created by Jean-Loup on 4/29/2025 in #❓┊help
Year data type
@adevade how would I do that when defining a table column in the resource?
13 replies
FFilament
Created by Jean-Loup on 4/29/2025 in #❓┊help
Year data type
Not particularly no. To be fair I could probably just use an integer but since the data type is available and I'm actually storing years that seems to make more sense
13 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
This worked a treat thank you. I still have some cleaning up to do on my data but now I have something I can use to move forward. Very grateful for your help
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Thanks I appreciate that
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Any tips on how I can retrieve either of those? Everything I try seems to end up in the wrong scope :/
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Yeah that's not very clear then. So there's no way to pull more than one column in one statement then, not without modifying the structure of the imported file
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
But the docs say you can pass multiple columns to resolveUsing. It's just unclear whether this also works when passing a function
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Ok so the upload form always wants to map author to one of the columns of the csv which means $state always has the same value. How do I make sure this $state contains multiple columns which can then be mapped to a single table columns?
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Right thanks I didn't know you could append firstOrCreate() in that way. I'll try it and get back to you
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
I'm not using authors but why not it works as an example. I can't give you the exact data I'm working with as it's confidential but for the sake of moving forward say I have a CSV of books and authors. Both the author and book tables are empty to start with. I want for each line it reads to search if an author already exists and add one if not, then retrieve the author id from there to add it to the book table as a foreign key. That's a 2-table example but of course I'll need to expand that to my 6 tables. Does that make sense?
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Bumping this in case people don't look at this forum on weekends. It would be a great help to find a solution to this today. Thanks
21 replies
FFilament
Created by Jean-Loup on 3/28/2025 in #❓┊help
import from csv into multiple related tables
Yes but I have no idea what else to do beyond that. It's really unclear how to do what I need when you don't refer to a record which already exists
21 replies