Setting the order by column for a Laravel model
How to set a Laravel model’s default orderby column without modifying existing queries or implementing in new calls. This is done using the boot function which is used to override…
How to set a Laravel model’s default orderby column without modifying existing queries or implementing in new calls. This is done using the boot function which is used to override…
Apply an auth middleware to only certain routes in a Laravel resource route without needing to write out each route individually. Generally a CRUD resource route looks like this in…
Simple Centered Bootstrap 5.2 authentication pages; login, register, verify email and reset password. Centered on the page using an auto margin, these clean designs are easy to customize or use…
A modern-looking Bootstrap card element built with Bootstrap version 5.2 Usually the default Bootstrap card has a very defined header and footer consisting of a border and shaded background. This…
How to make registered users verify their account email before using the Laravel application. With the baseline Laravel authentication framework Breeze when a user registration or sign-up occurs the user…
A guide on sending an email when a user registers on your Laravel application. This gives you a near-instant notification on registration activity. Whilst the user gets a welcome and…
Use a custom email template blade file for your Laravel password reset email with just 6 lines of code. Open app/Providers/AuthServiceProvider.php in the boot() function paste and edit the following:…
Use your own email template blade file for the user verification email in Laravel, instead of the default email layout. Sending a custom verification email is quite simple, all 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…