In a recent project I’ve been building a Customer Service Portal where “agents” are allowed to perform certain actions on a user’s account. One of the required features was to send a password reset email to the user. Luckily, this feature is easy to implement thanks to Laravel’s built-in traits.
Recently, I had to create a Laravel Artisan script that would log into a SFTP server, check if a certain file exists, and then upload / override the file. To achieve this, I used the SSH library from LaravelCollective. This tutorial covers how to log into a remote server using SSH / SFTP and upload or download files.Laravel 5, PHP, SFTP, SSH
I have always found it frustrating that failing the CSRF check in Laravel 5.x throws an exception. I would rather prefer it redirect the user back to the previous page, and get them to try again. So, I modified the VerifyCsrfToken.php middleware to do just that.CSRF, Laravel 5, PHP, Tutorial