Hide Record id from url on edit resource

Hello all, can I hide the <record> field on edit page? For example I have a corporation resource, I want to hide "1" from url, I want to be the URL as "panel/dernekler/edit" is it possible?
13 Replies
toeknee
toeknee2y ago
Not in filament at present since we get the ID in the request to determine which you are editing/
onursahindur
onursahindurOP2y ago
Ah okey, is it possible to supply the id programmatically by overriding a function or something like that? I am developing a settings page for all corporations using my system. But I do not want one to see their id's on url when they are editing basically when the url "/dernekler/edit" called, it will use admin's corp_id value from db
toeknee
toeknee2y ago
Just use a modal instead of a page if you want to hide the ID's that badly? Settings pages should be under strict policies, so from a manipulation point of view it shouldn't be possible to manipulate settings by having the ID.
onursahindur
onursahindurOP2y ago
I cant' because it may hold tabs as well Yes, I prevent them with policies. No one can edit the other one's settings. But, when a corporation editing their page, I will always read the person's corp_id from db. So because of that I wondered if it is possible to hide the record id from url and read it via a overwritten method from resource for example a getRecordId() function like getTitle()
toeknee
toeknee2y ago
You could try doing it via a post and customising the page moreso, you would need to code dive on the edit/create page classes to see the ability. But I think you are making a mountain out of nothing.
onursahindur
onursahindurOP2y ago
modals are not an option for me however before deep diving, I will search for another way around it Thanks.
Dennis Koch
Dennis Koch2y ago
I guess the best way is to create a separate page for them and not use the same as the resource
hashim199
hashim1998mo ago
if we want to hide complete record or decrpyt it. how can we do that any idea?
krekas
krekas8mo ago
What do you mean by hide record?
hashim199
hashim1998mo ago
like http://127.0.0.1:8000/meetinginfos/40 this is my url now the user will know that there are total 40 meeting or more than 40 meetings i want to hide this
krekas
krekas8mo ago
you can't only thing maybe change from id to uuid then
Ozumat77
Ozumat778mo ago
You can use slug aswell
hashim199
hashim1998mo ago
❤️
Want results from more Discord servers?
Add your server