Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dam28800's avatar

Error 419 if only one cache config

Hello,

I am currently using laravel envoy to deploy my sites on my own servers.

I have some standard tasks in my story:

clone_repository
bdd_migrate
run_composer
npm_install
npm_run_prod
cache

I am migrating to envoyer.io In the Deployment Hooks, I have:

Clone New Release
Install Composer Dependencies
NPM Install
NPM Run Prod
Activate New Release
Cache
Purge Old Releases

In the cache hooks, I have the following instructions:

cd {{ release }}

echo "chown bootstrap/cache"
chown -R $USER:www-data bootstrap/cache
chmod -R 775 bootstrap/cache

php artisan config:cache # Without this line error 419

echo "Caching"
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:cache
echo "End caching" cache"

If I don't put the php artisan config:cache line twice, I get a 419 page expired error when I post my forms.

What do you think? Thanks in advance for your help/

0 likes
0 replies

Please or to participate in this conversation.