Skip to content

Snnick/laravel-file-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Run the following command to install the latest applicable version of the package:

composer require snnick/laravel-file-downloader

After installation, you can publish the package configuration using the vendor:publish command. This command will publish the file-downloader.php configuration file to your config directory:

php artisan vendor:publish --provider="Snnick\LaravelFileDownloader\LaravelFileDownloaderServiceProvider"

You may configure the file path in your .env file:

FILE_DOWNLOAD_PATH=app/public/files

Download

You can download files:

$strategy = new PdfDownloader(
            'pdf.invoices',
            'invoices',
            ['calculations' => new CalculationsDTO($calculations)]
        );
$service = new FileDownloaderService($strategy);
$filepath = $service->download();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages