Error Class 'Swift_StreamFilters_StringReplacementFilter' not found
I am new to Laravel.
I have encountered a dead-end. I posted the question on StackOverflow, and hopefully it's okay to post the link here in the hope that someone in the Laravel community might have a remedy.
Code that works fine on my machine using Mailtrap fails on InMotion Hosting's server. Something is wrong, I believe with my mail configurations, but at the same time they appear correct.
I was unable to find any solutions online and only one link of the same issue. It was posted but there were no replies. Any help is greatly appreciated.
How did you install the application on the production server? Definitely worth running composer dump on the server if you have ssh access. If you install on the server, delete the vendor folder and run composer install
Thanks Snapey. The code was deployed to InMotion Hosting via FTP. It's a shared server account. I do not believe that I have access to a CLI in a shared server account. I do suspect that it's possible that something went wrong uploading 27,000 files because during debugging I found two files that were empty. It's my understanding that only a dedicated server account (expensive) has use of the CLI. Is that correct?
a vps can be had from as little as $5 per month, but anyway;
Before you FTP the site, I would
run composer dump
clear cached views php artisan view:clear
cache the config php artisan config:cache
cache the routes php artisan route:cache
you really need to think about how you deploy projects though because FTPing the site is laborious and error prone. It won't give you confidence to push changes each time you make them.
A 'best practice' on deployment with Laravel is Laravel Forge (https://forge.laravel.com). You can easily connect your repository (github/bitbucket/etc) to a host on a VPS (that are provisioned by Forge aswell). It'll cost you maybe a bit more than your plain old webhosting provider, but it saves you hours of work on uploading files and debugging your project.
Features include cPanel, FTP/SSH access, Softaculous application installer, and email creation and management.
So you should be able to connect via ssh to your server and then run the suggested commands to correctly deploy your application.
You'll probably have to enable and configure your ssh access from the cPanel (that it's included according to the shared-hosting specifications mentioned above)
File errors occurred during FTP upload to host server. Ran those commands and re-uploaded using FileZilla and over-writing files where the target already existed (several target files were empty). Code now works as expected. Thanks!