Laravel
Setting process priority for Laravel Horizon workers
Laravel Horizon lets you set the Linux nice value for worker processes, giving them more or less CPU scheduling priority.
CSRF token mismatch in Laravel
A CSRF token mismatch means Laravel rejected a request because its token was missing, wrong, or expired. It is the same protection behind the 419 page, here is how to send the token correctly.
MySQL 1071: Specified key was too long (Laravel migration)
This migration error happens on older MySQL with the utf8mb4 charset, where indexed string columns exceed the index size limit. The fix is a one-line default in your service provider.
Laravel failed to open stream: Permission denied
A blank page or 500 error right after deploying is almost always a permission problem on the storage or bootstrap/cache directory. Here is how to fix the ownership properly.
Target class does not exist in Laravel
This error means Laravel cannot resolve a controller or class you referenced in a route or container binding. Almost always a namespace, typo or autoload issue.
No application encryption key has been specified
This Laravel error appears when the APP_KEY is missing. It is one of the first things you hit after cloning a project. The fix is a single artisan command.
Vite manifest not found in Laravel
This error means Laravel cannot find your compiled frontend assets. Either the dev server is not running, or you never built your assets for production.
Redis connection refused in Laravel
When Laravel uses Redis for cache, sessions or queues, a "Connection refused" error means it cannot reach the Redis server. Usually the service is down or the host is wrong, especially in Docker.
500 Internal Server Error in Laravel
A 500 error is a generic "something broke" on the server. The error itself tells you nothing, the real message is in your logs. Here is where to look and the usual culprits.
Environment variables in Laravel
A complete list of all available environment variables used in the latest Laravel (version 11).
419 Page Expired error in Laravel
When working with Laravel you will encounter this error from time to time. Here's how you can fix this error.
How to clear cache in Laravel
Laravel uses caching for a lot of parts of the framework, here's how you can clear all of them.
Complete list of Laravel events
Laravel provides quite a lot of events that are fired by default, which makes it easy to hook into using listeners.
Laravel Valet
For Mac users Laravel Valet is an execellent tool to develop all your PHP projects locally.
Creating an encrypted cookie value in Laravel
Disable CSRF in Laravel
Sometimes you need to disable the CSRF token verification in Laravel. A common use case is when you want to receive POST webhooks.
Logging in Laravel
When you have an web app running, it is important to know what it does and how it's going. To get more insight into this, using the extensive logging features of Laravel is key.
How to check which Laravel version of your app is using
Check which Laravel version your app is running on.
Disable cookies in Laravel
When you don't need cookies, it's a good practice to prevent your app from creating them in the first place.
How to use different PHP versions with Laravel Valet
Laravel Valet is an awesome tool to quickly setup an development environment on your Mac. Here's how you can switch between different PHP versions while developing multiple projects.