Support the ongoing development of Laravel.io →
Security Database Architecture
Last updated 2 years ago.
0

Php has its own randomstring generator. You will just need to put a manual check if it exists already. If not try to create another random string. This should work, however I would not quite recommend it. I have no idea how laravel will respond to this.

As far as I know it wouldnt increase the security as you would mainly want no external access to the database itself. This atleast is how I do it.

Last updated 2 years ago.
0

What kind of security would you get by doing this?

If you are worried about using row id's in your URI's, you can try creating slugs with https://github.com/cocur/slugify or hashids https://github.com/ivanakimov/hashids.php

Last updated 2 years ago.
0

I'm using UUIDs as primary keys for all my models. Have a look at this: http://garrettstjohn.com/entry/using-uuids-laravel-eloquent-orm/

Last updated 2 years ago.
0

mruoss said:

I'm using UUIDs as primary keys for all my models. Have a look at this: http://garrettstjohn.com/entry/using-uuids-laravel-eloquent-orm/

Why would you adjust your models like that? Creating an extra column for your uuid and index it shouldn't be a big deal. Besides your going to have to adjust a lot more if you want to use Laravel's Relationships

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

nipunhere nipunhere Joined 8 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.