The Cloudflared for Laravel is a simple package to create and manage Cloudflare Tunnel for your Laravel projects. Paried with a companion Vite plugin for Cloudflared, you can easily test and debug your frontend on any device.
It works using the following Artisan command, which will set up a Cloudflare tunnel, configure DNS, set up a Herd link, and save the configuration to .cloudflared.yaml in your project:
# Installphp artisan cloudflared:install # After setup, run itphp artisan cloudflared:run
You can also remove the tunnel, DNS records, and configuration using the provided Artisan command:
php artisan cloudflared:uninstall
This package also requires a Cloudflare account and depends on Cloudflare Tunnel, which you will need to download. The cloudflared CLI is also available via Docker.
Install this in your project via Composer:
composer require aerni/cloudflared
👨💻 You can get started with this package on GitHub: aerni/laravel-cloudflared