In deploying a laravel project to railway, i noticed that you have to upgrade the php version to a higher version
eg. "php": "^8.0.2" to "php": "^8.1".
and add this
NIXPACKS_BUILD_CMD=composer install or
NIXPACKS_BUILD_CMD=npm run build && composer install && php artisan optimize:clear && php artisan storage:link && php artisan migrate --force && php artisan passport:keys