feat: Add Swindon\FilamentHashids middleware and update composer dependencies for enhanced ID encoding

This commit is contained in:
Yoga Pangestu 2026-01-19 10:57:09 +07:00
parent b4c6ed7229
commit 0dad32aa12
3 changed files with 267 additions and 1 deletions

View File

@ -23,6 +23,7 @@
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Swindon\FilamentHashids\Middleware\FilamentHashidsMiddleware;
use Swis\Filament\Backgrounds\FilamentBackgroundsPlugin;
use Swis\Filament\Backgrounds\ImageProviders\MyImages;
@ -76,6 +77,7 @@ public function panel(Panel $panel): Panel
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
FilamentHashidsMiddleware::class,
])
->plugins([
FilamentShieldPlugin::make()

View File

@ -23,6 +23,7 @@
"spatie/laravel-settings": "^3.6",
"spatie/laravel-sluggable": "^3.7",
"spatie/laravel-tags": "^4.10",
"swindon/filament-hashids": "^1.0",
"swisnl/filament-backgrounds": "^2.0",
"symfony/css-selector": "^7.4",
"symfony/dom-crawler": "^7.4"

265
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9ef9bb9f083fbdfe2d22c8b092633d54",
"content-hash": "c3241681c7b747c45669640b3b98b0f7",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@ -2180,6 +2180,76 @@
],
"time": "2025-12-03T09:33:47+00:00"
},
{
"name": "graham-campbell/manager",
"version": "v5.2.0",
"source": {
"type": "git",
"url": "https://github.com/GrahamCampbell/Laravel-Manager.git",
"reference": "b6a4172a32b931fe20c5c242251c8c98b2c79e41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/b6a4172a32b931fe20c5c242251c8c98b2c79e41",
"reference": "b6a4172a32b931fe20c5c242251c8c98b2c79e41",
"shasum": ""
},
"require": {
"illuminate/contracts": "^8.75 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
"illuminate/support": "^8.75 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
"php": "^7.4.15 || ^8.0.2"
},
"require-dev": {
"graham-campbell/analyzer": "^4.2.1 || ^5.0.0",
"graham-campbell/testbench-core": "^4.2.1",
"mockery/mockery": "^1.6.12",
"phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.10"
},
"type": "library",
"autoload": {
"psr-4": {
"GrahamCampbell\\Manager\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
}
],
"description": "Manager Provides Some Manager Functionality For Laravel",
"keywords": [
"Graham Campbell",
"GrahamCampbell",
"Laravel Manager",
"Laravel-Manager",
"connector",
"framework",
"interface",
"laravel",
"manager"
],
"support": {
"issues": "https://github.com/GrahamCampbell/Laravel-Manager/issues",
"source": "https://github.com/GrahamCampbell/Laravel-Manager/tree/v5.2.0"
},
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/graham-campbell/manager",
"type": "tidelift"
}
],
"time": "2025-03-02T20:18:37+00:00"
},
{
"name": "graham-campbell/result-type",
"version": "v1.1.4",
@ -2653,6 +2723,75 @@
],
"time": "2025-08-22T14:27:06+00:00"
},
{
"name": "hashids/hashids",
"version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/vinkla/hashids.git",
"reference": "197171016b77ddf14e259e186559152eb3f8cf33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vinkla/hashids/zipball/197171016b77ddf14e259e186559152eb3f8cf33",
"reference": "197171016b77ddf14e259e186559152eb3f8cf33",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": "^8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-bcmath": "Required to use BC Math arbitrary precision mathematics (*).",
"ext-gmp": "Required to use GNU multiple precision mathematics (*)."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Hashids\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ivan Akimov",
"email": "ivan@barreleye.com"
},
{
"name": "Vincent Klaiber",
"email": "hello@doubledip.se"
}
],
"description": "Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers",
"homepage": "https://hashids.org/php",
"keywords": [
"bitly",
"decode",
"encode",
"hash",
"hashid",
"hashids",
"ids",
"obfuscate",
"youtube"
],
"support": {
"issues": "https://github.com/vinkla/hashids/issues",
"source": "https://github.com/vinkla/hashids/tree/5.0.2"
},
"time": "2023-02-23T15:00:54+00:00"
},
{
"name": "joaopaulolndev/filament-pdf-viewer",
"version": "v2.1.0",
@ -7026,6 +7165,63 @@
],
"time": "2025-01-13T13:04:43+00:00"
},
{
"name": "swindon/filament-hashids",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/swindon/filament-hashids.git",
"reference": "d37de6902fa2c3105f74a1e5316f753dcfca69f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swindon/filament-hashids/zipball/d37de6902fa2c3105f74a1e5316f753dcfca69f0",
"reference": "d37de6902fa2c3105f74a1e5316f753dcfca69f0",
"shasum": ""
},
"require": {
"illuminate/support": "^9.0|^10.0|^11.0|^12.0",
"php": "^8.0",
"vinkla/hashids": "^10.0|^11.0|^12.0|^13.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Swindon\\FilamentHashids\\Providers\\FilamentHashidsServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Swindon\\FilamentHashids\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Scott Windon",
"email": "me@scottwindon.com"
}
],
"description": "A Laravel Filament package that automatically encodes and decodes model IDs using vinkla/hashids for improved security and aesthetics.",
"keywords": [
"encoding",
"filament",
"hashids",
"laravel",
"security",
"url"
],
"support": {
"issues": "https://github.com/swindon/filament-hashids/issues",
"source": "https://github.com/swindon/filament-hashids/tree/v1.0.0"
},
"time": "2025-04-02T22:04:44+00:00"
},
{
"name": "swisnl/filament-backgrounds",
"version": "2.0.1",
@ -9873,6 +10069,73 @@
],
"time": "2025-06-26T14:11:46+00:00"
},
{
"name": "vinkla/hashids",
"version": "13.0.0",
"source": {
"type": "git",
"url": "https://github.com/vinkla/laravel-hashids.git",
"reference": "f59ebf0d223b4986c4bdc76e6e694bf6056f8a0a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/f59ebf0d223b4986c4bdc76e6e694bf6056f8a0a",
"reference": "f59ebf0d223b4986c4bdc76e6e694bf6056f8a0a",
"shasum": ""
},
"require": {
"graham-campbell/manager": "^5.2",
"hashids/hashids": "^5.0",
"illuminate/contracts": "^12.0",
"illuminate/support": "^12.0",
"php": "^8.2"
},
"require-dev": {
"graham-campbell/analyzer": "^5.0",
"graham-campbell/testbench": "^6.1",
"mockery/mockery": "^1.6.6",
"phpunit/phpunit": "^11.5"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"Hashids": "Vinkla\\Hashids\\Facades\\Hashids"
},
"providers": [
"Vinkla\\Hashids\\HashidsServiceProvider"
]
},
"branch-alias": {
"dev-master": "12.0-dev"
}
},
"autoload": {
"psr-4": {
"Vinkla\\Hashids\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Vincent Klaiber",
"homepage": "https://github.com/vinkla"
}
],
"description": "A Hashids bridge for Laravel",
"keywords": [
"hashids",
"laravel"
],
"support": {
"issues": "https://github.com/vinkla/laravel-hashids/issues",
"source": "https://github.com/vinkla/laravel-hashids/tree/13.0.0"
},
"time": "2025-03-02T21:39:35+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v5.6.3",