LaravelPackages.net
Acme Inc.
Toggle sidebar
junichimura/laravel-encrypt-storage-driver

20
0
1.0.0
About junichimura/laravel-encrypt-storage-driver

junichimura/laravel-encrypt-storage-driver is a Laravel package. It currently has 0 GitHub stars and 20 downloads on Packagist (latest version 1.0.0). Install it with composer require junichimura/laravel-encrypt-storage-driver. Discover more Laravel packages by junichimura or browse all Laravel packages to compare alternatives.

Last updated

Laravel Storage Encrypter

Install

Composer

  • For Laravel: run composer require junichimura/laravel-encrypt-storage-driver in your project folder.

After Composer require

  • php artisan vendor:publish --tag=junichimura-encrypt_storage

After Installation

file: config/filesystem.php

<?php
return [

    'disks' => [

        'encrypt_local' => [
            'driver' => 'encrypt_local', // <- driver type enctypt_local
            'root' => storage_path('app'),
        ],
        
];

Example

PUT

$plainContents = 'content';
\Storage::driver('encrypt_local')->put('/store/path', $plainContents)

GET

$plainContents = \Storage::driver('encrypt_local')->get('/store/path');

FILE UPLOAD

$file = request()->file('fileName');
$file->store('/store/path', 'encrypt_local');
// or
$file->storeAs('store/path', 'filename.extention', 'encrypt_local')

Star History Chart