Type-hinting PHP 7/8 laravel • 20-04-2021 • by Conrad Maaijen Besides naming variables properly, you should use type hinting in order to make your code more readable. Don’t use $project for an id, instead use “int $projectId”. I guess a picture makes it more clear: