Laravel run an event when user verifies email
How to run an event or function when a user verifies their account by using a Laravel listener. Start by creating a listener in Artisan php artisan make:listener SendVerifiedWelcomeMail You…
How to run an event or function when a user verifies their account by using a Laravel listener. Start by creating a listener in Artisan php artisan make:listener SendVerifiedWelcomeMail You…
How to create and use a custom middleware in Laravel 9. A middleware means that any HTTP request for that route must pass through it, making it good for checking…
How to clear all of the different Laravel cache types using the Laravel Artisan console. Clearing the application cache The application cache or simply said as “cache” is the data…
How to change the default Laravel authentication routes such as Login and register to your own custom-defined routes. This example will change the default login route from /login to /signin….
Validating a registration form in Laravel to return an error message if the submitted username already exists. This can be used for other fields like an email address or a…
How to have randomly generated strings as user ids in Laravel instead of incrementing integers. By having random strings for identification you can avoid revealing how many users you have,…
Creating and installing a blank Laravel app on an Ubuntu 22.04 Vultr instance to be snapshotted for rapid redeployment. This includes Apache, Composer and PHP 8.1 installations. Current promotion free…
A MySQL Foreign key is a field or multiple fields in a table that identify to other another table uniquely to enforce data integrity. This relationship can also be seen…
Creating a form to upload multiple files using Laravel 9 with file type and size validation. Included is a controller, model, upload form and migration for the database table to…
How to do an image upload form and handler in Laravel 9 with file validation. Included is a controller, upload form and migration for the database table to store information…