PHPackages                             rezaf-dev/laravel-temp-link - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. rezaf-dev/laravel-temp-link

ActiveLibrary[File &amp; Storage](/categories/file-storage)

rezaf-dev/laravel-temp-link
===========================

Generate temporary symlinks to private files without using any database

v1.0.1(4y ago)010MITPHP

Since Jan 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rezaf-dev/laravel-temp-link)[ Packagist](https://packagist.org/packages/rezaf-dev/laravel-temp-link)[ RSS](/packages/rezaf-dev-laravel-temp-link/feed)WikiDiscussions main Synced 4w ago

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

Laravel Temporary Link
======================

[](#laravel-temporary-link)

[![Latest Version on Packagist](https://camo.githubusercontent.com/83f550c7a2ed160206743be28987bc667b4541f18e5aab97a4545318e68388a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657a61662d6465762f6c61726176656c2d74656d702d6c696e6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rezaf-dev/laravel-temp-link)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f7803a04ed590159f032afd1cd0042bab9eeb8753855a6fd002ecfb5a1e67849/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72657a61662d6465762f6c61726176656c2d74656d702d6c696e6b2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/rezaf-dev/laravel-temp-link/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cc0936041404929c0bc1f106f149454a5c670d309a628ad10cfcb4f5b0e6e6cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f72657a61662d6465762f6c61726176656c2d74656d702d6c696e6b2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/rezaf-dev/laravel-temp-link/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ed44709b176b7e86fb32b7546ce9e1dc7a919a9f69f81a3fd025ba60c715e2e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72657a61662d6465762f6c61726176656c2d74656d702d6c696e6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rezaf-dev/laravel-temp-link)

If you have a private file and want to give access to it for a short period, this package helps you create a temporary link to this file. It doesn't need a database and works just by symlinks. Users can directly access a private file with a direct link that is randomly generated. A scheduled task will delete expired links.

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

[](#installation)

You can install the package via composer:

```
composer require rezaf-dev/laravel-temp-link
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-temp-link-config"
```

This is the contents of the published config file:

```
return [
    'temp_link_path' => '/temp',
    'disk' => 'public',
    'scheduler' => true,
];
```

Usage
-----

[](#usage)

You can use TempLink Facade to generate a new link:

```
user \RezafDev\LaravelTempLink\Facades;
echo TempLink::generateTempLink('path/to/private/file.txt', 3600);
// http://127.0.0.1:8000/storage/16435/325/61f6430b18189.txt
```

You need to set [laravel scheduler](https://laravel.com/docs/8.x/scheduling#running-the-scheduler) to run regularly to remove expired links. Please note that if you run a cron job every 10 minutes, you shouldn't generate links with an expiration time less than 10 minutes (You can, but it doesn't work).

```
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

```

You can also run this command manually to remove the expired links:

```
php artisan templink:delete

```

If you want to schedule this command yourself, you can set "scheduler" config to false.

To make the deletion more efficient, you should not generate links with less than 100 seconds expiration time.

Testing
-------

[](#testing)

```
./vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

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

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~0 days

Total

2

Last Release

1560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48770a48ab2e1ebc11cab96a9f07281aa952a858bd107e625ed762bdf4176d08?d=identicon)[rezaf-dev](/maintainers/rezaf-dev)

---

Top Contributors

[![rezaf-dev](https://avatars.githubusercontent.com/u/90597273?v=4)](https://github.com/rezaf-dev "rezaf-dev (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rezaf-dev-laravel-temp-link/health.svg)

```
[![Health](https://phpackages.com/badges/rezaf-dev-laravel-temp-link/health.svg)](https://phpackages.com/packages/rezaf-dev-laravel-temp-link)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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