How to validate if username already exists in Laravel
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…
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…
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…
Using the Laravel route() helper function to generate URLs for named routes. This follows on from creating named routes where creating links to pages and passing in parameters is done…
A method to view your Laravel routes with PHP code that is an alternative to the command php artisan route:list –except-vendor. In this post the routes will be displayed in…
How to view a raw Laravel database query from the DB facade with its bindings. This is a good method to debug if your queries with the query builder are…
Naming routes in Laravel isn’t a necessity however it makes referencing so much easier when you want to reference a route when generating URLs and pass parameters to it. Take…
How to organize Laravel routes into separate files for better organization and readability. This isn’t something that would be done for a small project, rather a large one whereby the…