First Error:
Fix:
In App -> Http -> Kernel.php line 22 we will comment out this:
/* comment this out because its causing errors anytime someone submits a form with an empty value
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
end comment */
Second Error:
Once on Laravel 6.0 we needed to jump our version of php because the site would not load with our old version of php 7.2 running. We asked valet to use @php7.4 which caused this error message:
Brew was unable to install [php@7.4]
To Fix:
brew update
brew upgrade php
composer global update
valet install
valet use php@7.4
composer global update
*note if the latest version of valet did not come installed with support for php 7.4 (it did, but if it didn’t) then we could have edited this file:
code ~/.composer/vendor/laravel/valet/cli/Valet/Brew.php
class Brew
{
const SUPPORTED_PHP_VERSIONS = [
'php',
'php@7.4',
'php@7.3',
'php@7.2',
'php@7.1',
'php@7.0',
'php@5.6',
'php73',
'php72',
'php71',
'php70',
'php56'
];
*just add php 7.4 to the top of the list, or whatever version of php you need valet to support.
First Error On Staging Site:
When trying to submit a form we get this error message of “undefined index:secret”
Fix:
Double check that the file config -> services.php has the SparkPost varialbes setup correctly, they should be:
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
// optional guzzle specific configuration
'guzzle' => [
'verify' => true,
'decode_content' => true,
],
'options' => [
// configure endpoint, if not default
'endpoint' => env('SPARKPOST_ENDPOINT'),
// optional Sparkpost API options go here
'return_path' => 'SendingEmail@verifieddomain.com',
'options' => [
'open_tracking' => false,
'click_tracking' => false,
'transactional' => true,
],
],
],
*You can also see the full list of install tips and config tips for the package here: https://github.com/vemcogroup/laravel-sparkpost-driver