PHPackages                             mindlarkdev/laravel-limited-use-signed-url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mindlarkdev/laravel-limited-use-signed-url

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mindlarkdev/laravel-limited-use-signed-url
==========================================

Laravel Limited Use Signed URL

0.0.1(6y ago)021MITPHPPHP ^7.1

Since Feb 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mindlarkdev/laravel-limited-use-signed-url)[ Packagist](https://packagist.org/packages/mindlarkdev/laravel-limited-use-signed-url)[ Docs](https://github.com/mindlarkdev/laravel-limited-use-signed-url)[ RSS](/packages/mindlarkdev-laravel-limited-use-signed-url/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Description
===========

[](#description)

This is an extensive modification of [Laravel Single Use Signed URL](https://github.com/intellow/laravel-single-use-signed-url). This version allows a customizable number accesses to the generated URL, after which the url will be unavailable. This package was created specifically for signed URLs that can be used as a temporary `src` url for media files. Due to the way browsers often handle these urls, the request will be made twice -- once for a pre-flight request and the second time for the actual file. This implementation allows for the url to be used twice in quick succession, but then the url will become unavailable. The url generated will only be available to the user who generates it and an expiration time can be set for the url usage.

Installation
------------

[](#installation)

1. Install with composer:

```
composer require mindlarkdev/laravel-limited-use-signed-url
```

2. Publish the configuration file:

```
php artisan vendor:publish
```

Select the `Mindlarkdev\LimitedUseSignedUrl\LaravelLimitedUseSIgnedUrlSeviceProvider` item.

The config file is named `limited-use-urls.php` and has the following options:

```
return [
	'expires_in_minutes' => 2,
	'uses_allowed' => 2,
]

```

These settings allow you to set the default expiration and allowed uses. These parameters can also be overridden when a url is created in a controller.

3. Run `php artisan migrate`.

Usage
-----

[](#usage)

I originally forked this from [Laravel Limited Use Signed URL](https://github.com/intellow/laravel-limited-use-signed-url) so I could make it more difficult for someone to actually access a direct download link for an embedded `src` attribute url. The original package is quite useful for limited-use URLs for password resets, etc.

First create a route that accepts a {user} as a parameter and give it a name. For example:

```
Route::get('/play-media/{user}/{content}', [LimitedUseSignedUrlController::class, 'handle'])
->name('limited-use-url')
->middleware('validateLimitedUseSignedUrl');
```

The above route can be whatever you want really. The package will append the extra paramaeters in the background. For example, you could create a route like: `Route::get('/play-media/{user}/{media}', ...)`. However, you **must** include the `{user}` as the first parameter in the route.

Then in a controller you can generate a dual use signed url to this route with the following:

```
$urlData = [
	'route_name' => 'limited-use-url',
	'user_id' => auth()->user()->id,
	'expires_in_minutes' => 3, // OPTIONAL - default set in config file
	'uses_allowed' => 1 // OPTIONAL - default set in config file
];
$extraParams = ['content' => $content->id]; // Extra params will be added to the route. In the above example, we're using {content}

$url = MakeLimitedUseSignedUrl::makeUrl('limited-use-url', $urlData, $extraParams);
```

For my use (as the `src` attribute), I can then simply pass the `$url` to the view and use it in the audio or video tag.

### Testing

[](#testing)

Tests are not working right now.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- Multi-use URLs Implementation: [midlarkdev](https://github.com/mindlarkdev)
- Original package by: [Intellow](https://github.com/intellow)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1ddce59ef3c7cf314d2d3a5f5dc2e3bf37864f006012169e571b05b919784f?d=identicon)[mindlarkdev](/maintainers/mindlarkdev)

---

Top Contributors

[![benxmy](https://avatars.githubusercontent.com/u/20016973?v=4)](https://github.com/benxmy "benxmy (16 commits)")[![intellow](https://avatars.githubusercontent.com/u/40676515?v=4)](https://github.com/intellow "intellow (2 commits)")[![mindlarkdev](https://avatars.githubusercontent.com/u/61098278?v=4)](https://github.com/mindlarkdev "mindlarkdev (2 commits)")

---

Tags

laravel-limited-use-signed-urlmindlarkdev

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mindlarkdev-laravel-limited-use-signed-url/health.svg)

```
[![Health](https://phpackages.com/badges/mindlarkdev-laravel-limited-use-signed-url/health.svg)](https://phpackages.com/packages/mindlarkdev-laravel-limited-use-signed-url)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40423.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
