samedi 2 février 2019

Setting Up Laravel Filesystem

I have a site built in /Users/jgravois/code named qrf and another in /Users/jgravois/code named file_store. This is the local representation of a DigitalOcean droplet that also houses the same sites in /var/www.

In the qrf application, I have the following setup in config/filesystems.php with an .env variables of .ENV

FILESYSTEM_DRIVER=store
FILE_STORE=https://file_store.dev/
FILE_STORE_PATH=/Users/jgravois/code/file_store/

.FILESYSTEMS

'disks' => [
        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
        ],

        'store' => [
            'driver' => 'local',
            'root' => env('FILE_STORE_PATH')
        ],

    ],

My expectation is that the store disk is set as default and when I use something below, I expect the file to be saved in the File Store.

$path = "qrf/20190201/{$imageName}";
$image->put($path, file_get_contents($image), 'public');

HOWEVER, the file is being stored INSIDE the QRF application at /public/20190201



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire