I am using laravel forge to deploy the application. The form submission on the local server works fine. It finds the right route declared in the route file. But it does not work on the live server. On live server when I hit submit button I got “Whoops, looks like something went wrong.” message.
What could be the reasons? I will highly appreciate your help. Thanks in advance.
Here are the routes declared:
Route::get('/training/seo/outreach/brochure','BrochureDownloadController@index');
Route::post('/training/seo/outreach/brochure','BrochureDownloadController@store');
Here is the code on form
<form class="js-validate" method="post" id="brochure_download" name="brochure_download" action="{{ action('BrochureDownloadController@store')}}">
{{ csrf_field()}}
Deploy Script ( On forge)
cd /home/forge/www.xponent.com.bd
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
composer dump-autoload
php artisan cache:clear
echo "" | sudo -S service php7.2-fpm reloadif [ -f artisan ]
then
php artisan migrate --force
fi
2
Answers
Please run below command:
Update your script
Add
php artisan config:cache