I pulled my changes to the server and ran php artisan config:cache and it cleared but gave me this message. I don't know how to fix it. Can someone please help me understand what this means?
Your configuration files are not serializable.
at vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71
67▕ require $configPath;
68▕ } catch (Throwable $e) {
69▕ $this->files->delete($configPath);
70▕
➜ 71▕ throw new LogicException('Your configuration files are not serializable.', 0, $e);
72▕ }
73▕
74▕ $this->info('Configuration cached successfully!');
75▕ }
1 bootstrap/cache/config.php:965
Error::("Call to undefined method Closure::__set_state()")
+14 vendor frames
16 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
@mcadio I don't know why you need them at all - it looks like nothing is configured currently. A static security.txt file that returns Hello World is hardly useful.
@tykus That's a possibility. I do have email through another provider, and I also use google my business and analytics. There was something I needed to verify using well-known and I didn't know how to do it so I used that package. My nginx files are blocking well-known, though, so... ? If I need to later learn how to write a route cause something is failing, I'll be back!
@mcadio your nginx configuration might be configured to hide dotfiles, this is good as it prevents access to files beginning with a dot, like .git, .svn, .htaccess, and so on. You'll want to still do that but allow incoming requests to .well-known.
The following location directive should do just that, add that in your server directive and restart nginx. You might have to hunt down the location directive that blocks dotfiles first and remove it.
@tykus I agree that it's not useful, it's an example though showcasing you can return a response via the config. The config is meant to be updated to fit your own needs.
@mcadio Thank you for finding the serialization issue, didn't realize Laravel cannot serialize closures since I don't cache my configs normally. Thought Laravel could serialize closures. I do agree with @tykus though, it's better to add /.well-known in your own routes.
I created that package almost a year ago on a whim and didn't really think too much about it and never really found a good use for it so I've just let it sit, I'll deprecate it since I don't actually see a use for it anymore. 🙂