laravel-currency icon indicating copy to clipboard operation
laravel-currency copied to clipboard

Nothing seems to work when using the filesystem driver, even after manually creating currencies.json

Open nathan-io opened this issue 1 year ago • 1 comments

I'm trying to use the filesystem driver to load the currencies from disk, but having no luck.

My config:

    'driver' => 'filesystem',

// ...

    'cache_driver' => null,

// ...

        'filesystem' => [
            'class' => \Torann\Currency\Drivers\Filesystem::class,
            'disk' => null,
            'path' => resource_path('json/currencies.json'),

I manually created the currencies.json folder by taking the array from resources/currencies.php and converting it to JSON. I did this because the currency:update command outputs nothing.

After manually creating currencies.json, I verified that my config path is valid:

> file_exists(config('currency.drivers.filesystem.path'))
= true

However, I still get this:

> currency()->getCurrencies()
= []

What could be going wrong here?

Note that I haven't added the currency middleware, but don't really need that feature. I'm just trying to use this package to format currencies, and to provide a list of values for our dropdown.

nathan-io avatar Mar 22 '23 03:03 nathan-io