balping / laravel-hashslug

Package providing a trait to use Hashids on a model
GNU General Public License v3.0
132 stars 12 forks source link

Should create a default config file #5

Closed iflamed closed 6 years ago

iflamed commented 6 years ago

https://github.com/balping/laravel-hashslug/blob/5b0f3ce69895873547f7aa5ca31101bd1ba5fdac/src/HasHashSlug.php#L64

The env function will work at laravel debug environment but not work when laravel running at production.

iflamed commented 6 years ago
<?php

return [
    'appsalt' => env('APP_KEY')
];

This code will compatible with the history releases.

balping commented 6 years ago

I just tested it with APP_ENV=production and still works. The env function doesn't require local environment.

iflamed commented 6 years ago

In production mode, The env function will not work after run php artisan config:cache image

balping commented 6 years ago

Thanks for pointing this out. The fix is released.