PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By
Views

Create Unique Youtube URL's

Create Unique Youtube URL's

Have you ever wanted to create a unique URL like Youtube. The URL usually has a cool unique key with something like:

youtube.com/watch?v=bjT5PJn0Mu8

That looks much better than using the ID of the video:

youtube.com/watch?v=234323

Well, how might you create a URL with a cool unique key that references the actual ID of the video, post, or content you are trying to retrieve from the database. The answer:

Hash IDs

Hash ID's

Hash ID's allow you to create these really cool looking keys that can be encoded and decoded back to the original ID.

There is an official package for creating HASH ID's in your PHP applications here: http://hashids.org/php/

And even better, if you are using Laravel you can use a specific version built just for Laravel here: https://github.com/vinkla/laravel-hashids

In fact there is a specific version of the Hash ID package for Laravel, Codeigniter, Symfony, Kohana, CakePHP, and many others.

So, the next time you need to create some cool HASH ID's for your application be sure to checkout this package.

Comments (0)

loading comments