skip to Main Content

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


  1. Please run below command:

    php artisan config:cache
    
    php artisan cache:clear
    
    php artisan view:clear
    
    php artisan route:clear
    
    Login or Signup to reply.
  2. Update your script

    Add php artisan config:cache

    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
    php artisan config:cache
    echo "" | sudo -S service php7.2-fpm reloadif [ -f artisan ]
    then
      php artisan migrate --force
    fi
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search