Commit for this lesson: https://github.com/LaravelDaily/Laravel-Filament-Admin-Course/commit/62c0e07726486e9f2ee1e0a4fea5d3d0adc43880
Commit for this lesson: https://github.com/LaravelDaily/Laravel-Filament-Admin-Course/commit/62c0e07726486e9f2ee1e0a4fea5d3d0adc43880
wow, what a good course is that.. thanks a lot <3
I have a question because the foreign key "product_id" in table "payments" is not nullable() we can't delete a product that has a payment.. so in this situation what is the good practice:
Well spotted. There's actually no "good practice", it's a question to you as a project creator, or to your client who ordered this project. Personally, I love using Soft Deletes almost everywhere, just in case.
Great course, thanks. I am wondering: what about a multi-value column as in TagsColumn, where each record should be addressed via a url resource? Thanks
Not sure I understand the part of "addressed via a url resource", could you expand a bit more, or give a link to some project that already works this way? (or screenshot)
Thanks, Povilas! Let's imagine a similar scenario: we have a Post and an Attachment models based on their tables, and they have their linked relationship, so for example in PostResource we can have a TagColumn that shows each attachment for a singular post:
So, how it could be possible to add a url method that can link to an AttachmentResource with a certain record? I hope it's clear :)
Don't think this is possi in the core. You have to make a custom column. you can take
TagsColumn
as a starter and add what you need.Is there any solution to open modal instead of url? I create fake column that pass record id to the controler that generate QR code for specific client in new tab. It works, but opening modal that will show the QR instead of new tab would be great.
Maybe changing
url
toaction
and calling a custom modal would work. It would be best if you experimented with this to find the best approach. Maybe instead of clicking on a row just prepend an action button.Thanks. I'll try. I just dont get to the point of building custom action for my app.