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
Not in filament at present since we get the ID in the request to determine which you are editing/
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 dbJust 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.
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()
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.
modals are not an option for me however before deep diving, I will search for another way around it
Thanks.
I guess the best way is to create a separate page for them and not use the same as the resource
if we want to hide complete record or decrpyt it. how can we do that any idea?
What do you mean by hide record?
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
you can't
only thing maybe change from id to uuid then
You can use slug aswell
❤️