As software developers one of the key foundations of success is speed and efficiency, especially being a Laravel developer, as you know which is the future of PHP. Before we talk shop, allow me to introduce myself: I’m Larry, a web developer who’s first started learning HTML in the early 90s, eventually picking up PHP (back when header and footer includes were “the way”), and more recently, working with Laravel for close to 7 years now (since version 5.4 / 5.5). My mission is to make web development more approachable, something we all know Laravel excels at.
Let me also introduce you to Glimpse: a tool designed to streamline Laravel development by automatically deploying GitHub pull requests to preview environments. Glimpse not only makes your code review and QA processes easier, but also increases your teams velocity and efficiency, leading to more frequent releases, fewer bugs in production, and a shorter feedback loop.
But why was Glimpse created? What challenges does it solve? And how does it compare to other alternatives?
Well, let’s dive in and we will uncover everything you need to know about Glimpse…
Deploying applications has always been a crucial part of the development process, but it hasn't always been smooth sailing. Traditionally, setting up environments to preview changes before merging them into the main codebase was time-consuming and prone to errors. Developers often had to manually configure servers, which not only delayed the deployment process but also increased the risk of inconsistencies between development, staging, and production environments.
I’m sure we can agree we’ve all felt like punching our screens at one point, right?
My frustration with these inefficiencies led me to create Glimpse. As a Laravel developer who relies on GitHub, I realized there was an opportunity to leverage Laravel Forge and automate the deployment of pull requests to live preview environments.
This way, developers could quickly see how their changes would work in a real-world setting before merging them. The idea was simple: Make the deployment process faster, more reliable, and easier for everyone involved. So everyone has a smile on their face.
The process of deploying changes for review can be cumbersome, especially when working in teams or on large projects. Some of the common problems developers fall into are:
-
Manual Deployment Hassles: Setting up environments manually for each pull request is time-consuming and prone to mistakes.
-
Inconsistent Environments: Differences between development, staging, and production environments can lead to bugs that are hard to track down.
-
Delayed Feedback: Without quick and accessible previews, the review process slows down, which can delay the entire project.
Now you can see why Glimpse is an essential part of your CI/CD pipeline. At its core, Glimpse takes your GitHub pull requests and automatically sets up a live preview environment for each one. This environment mirrors your production setup, allowing you to see how your changes will behave in the real world before they’re merged.
The tool integrates seamlessly with Laravel Forge, which manages your servers and handles the deployment process.
This means that every time a developer opens a pull request, Glimpse spins up a new environment where the code can be reviewed, tested, and validated. Once the changes are approved, they can be merged with confidence, knowing they’ve been thoroughly vetted. And once the changes are approved and merged, Glimpse will tear everything down to free up server resources.
Now onto the good stuff! Getting started with Glimpse is super straightforward:
- Sign up: First, sign up for a Glimpse account at glimpse.sh/register using your email or GitHub account.
- Integrate Forge and GitHub: Next, you need to create your Forge API token and add it to Glimpse and install the Glimpse GitHub App.
- Connect quickly: Once you have Forge and GitHub integrated, you can select which repositories you want to connect to your Glimpse account.
- Configure easily: After you have connected your GitHub repository(ies), you can configure your preview environments by specifying a domain, environment variables, deployment script and more.
- Deploy automatically: Now that your repository(ies) are connected and configured, Glimpse will trigger deployments automatically when pull requests are opened. You can also trigger a manually deployment by labeling the pull request with “Glimpse”
- Review and Test: Developers and stakeholders can access the preview environment to review and test the changes.
- Merge with Confidence: After thorough testing, the pull request can be merged, knowing the changes work as expected.
Glimpse also offers several notification options, allowing you to receive alerts via Slack, Linear and email when your preview environments are ready. Whether you’re working on a small project or managing a large team, Glimpse ensures that your deployments are smooth and error-free.
And don't just take my word for it. Have a look for yourself for what Laravel developers just like you have to say:
-
What if the deployment fails? If a deployment fails, Glimpse will notify you with a comment on the pull request and an email. There are links to the deployment logs you can review to help diagnose the issue.
-
How does Glimpse handle environment variables? Glimpse allows you to provide environment variables for each repository and encrypts them securely for storage, ensuring that sensitive information is protected while maintaining consistency across environments.
-
Can I customize the preview environments? Yes, you can customize the environment configuration to match your production setup closely. This includes your deployment script, environment variables, domain settings, queues, and more.
-
What if I’m not using Laravel Forge? Currently, Glimpse is designed to work seamlessly with Laravel Forge, but we're exploring integrations with other deployment platforms based on user demand.
-
What about my database? Glimpse automatically creates a database for each preview environment and updates your environment variable to match so there's nothing you need to do to have a working database for your preview environments.
In today’s fast-paced development landscape, tools like Glimpse make a difference. By automating the deployment of GitHub pull requests to live preview environments, Glimpse not only saves you time (after all, time is money) but also reduces the risk of bugs making it into production, which gives you the confidence and peace of mind knowing you’re shipping something that works.
It doesn’t matter if you are a solo dev or part of a large team, Glimpse can streamline your workflow and make your development process more efficient and less time-consuming.
Now it’s time for you to experience the benefits of automated preview environments for your Laravel project and take your development process to the next level!
Ready to give Glimpse a try? Sign up today and you will receive a 7 day free trial to start enjoying the benefits of automated preview environments. And as a special offer for Ash Allen subscribers and readers, I'm offering 50% off your first month if you subscribe to Glimpse today! Sign up using the link below and use the code LARAFRENS
when you checkout to receive your discount 👇