PHPackages                             mostafaznv/php-x-sendfile - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mostafaznv/php-x-sendfile

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mostafaznv/php-x-sendfile
=========================

Serve large files using web server with support for laravel

1.1.0(3y ago)5311.3k↓34.4%3MITPHPPHP &gt;=7.0.1

Since Jun 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mostafaznv/php-x-sendfile)[ Packagist](https://packagist.org/packages/mostafaznv/php-x-sendfile)[ RSS](/packages/mostafaznv-php-x-sendfile/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

PHP X-Sendfile
==============

[](#php-x-sendfile)

Serve large files using web server with support for laravel

Some features for X-Sendfile:
-----------------------------

[](#some-features-for-x-sendfile)

- Support **Nginx**, **Apache**, **LiteSpeed**, **Lighttpd**
- Automatic Server Type Detector
- Configurable
- Support Cache
- Set Extra Headers
- Compatible with Laravel

---

I develop in a open-source journey 🚀, I wish I lived in an environment where financial situation was fine and I could only focus on the path, but as you may know, life isn't perfect.
So if you end up using my packages, please consider making a donation, any amount would go along way and is much appreciated. 🍺

[![Donate](https://camo.githubusercontent.com/0b7607d470e0ccaa24269275d40233442275a42b0a714b4875bccf62f6ed5295/68747470733a2f2f6d6f73746166617a6e762e6769746875622e696f2f646f6e6174652f646f6e6174652e737667)](https://mostafaznv.github.io/donate)

---

Requirements:
-------------

[](#requirements)

- PHP &gt;=7.0.1
- FileInfo Extension

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

[](#installation)

Install using composer:

```
composer require mostafaznv/php-x-sendfile
```

Laravel (Optional)
------------------

[](#laravel-optional)

1. ##### Register Provider and Facade in config/app.php:

    [](#register-provider-and-facade-in-configappphp)

> Don't need for Laravel 5.5+

```
'providers' => [
  Mostafaznv\PhpXsendfile\PhpXsendfileServiceProvider::class,
],

'aliases' => [
  'Recaptcha' => Mostafaznv\PhpXsendfile\Facades\PhpXsendfile::class,
]
```

2. ##### Publish config file:

    [](#publish-config-file)

```
php artisan vendor:publish --provider="Mostafaznv\PhpXsendfile\PhpXsendfileServiceProvider"
```

Usage
-----

[](#usage)

```
