• Makers Make by SaaSykit
  • Posts
  • Laravel 11.30 released, SaaSykit adds usage-based subscriptions & reaches 300 customers, Herd adds Mongo DB, and more!

Laravel 11.30 released, SaaSykit adds usage-based subscriptions & reaches 300 customers, Herd adds Mongo DB, and more!

Hey Makers! 👋

The past two weeks have been a whirlwind, packed with exciting updates and growth across the board! Laravel just dropped version 11.30, delivering a number new cool features 🚀

And here's even more to celebrate: the SaaSykit community is booming, now with over 300 awesome users and growing every day! 🤩 🎉

Your support is making this journey incredible, and we're just getting started!

Let's dive into the latest tips, tools, and community highlights! 🎉

Laravel 11.30 is released 🚀

Laravel v11.30 brings exciting updates with new test helpers, enhanced unique ID support, and Enum integration improvements! Here’s a quick summary of the main features, along with example code snippets.

1. New withDefer() and withoutDefer() Test Helpers

The withDefer() and withoutDefer() test helpers are now available for working with deferred calls in tests. Disabling defer with withoutDefer() can be particularly useful when you need to test outcomes that would otherwise be deferred.

// ❌ Deferred call might interfere with the test outcome
Task::create(/* ... */);

$this->assertSomeDeferredOutcome();

// ✅ Disable defer to assert correctly
$this->withoutDefer();

Task::create(/* ... */);

$this->assertSomeDeferredOutcome();

2. HasUniqueStringIds Trait for Custom Unique IDs

Luke Kuzmish updated the Eloquent traits around unique IDs, making it possible to use custom string IDs without overriding resolveRouteBindingQuery(). The HasUniqueStringIds trait allows you to specify unique string formats tailored to your needs.

trait HasCustomId
{
    use HasUniqueStringIds;

    public function newUniqueId(): string
    {
        return (string) CustomIdGenerator::generate();
    }

    protected function isValidKey($key): bool
    {
        return CustomIdValidator::check($key);
    }
}

3. Enums in authorize() Method with AuthorizesRequests

Thanks to Johan van Helden, backed enums can now be used directly in the authorize() method. This change is part of a broader push in Laravel to enable Enums in various framework features, simplifying code and enhancing readability.

enum UserPermission: string
{
    case ACCESS_ADMIN = 'admin.access';
}

// Before
public function accessAdmin(): Response
{
    $this->authorize(UserPermission::ACCESS_ADMIN->value);
    // ...
}

// After
public function accessAdmin(): Response
{
    $this->authorize(UserPermission::ACCESS_ADMIN);
    // ...
}

SaaSykit adds support for usage-based (metered) subscription plans.

SaaSykit added the highly requested “Usage-based” subscription support. Now you can create a “Usage-based” plan from your admin panel, and set a per unit or even tiered pricing for your product, and let SaaSykit handle the rest.

Depending on your plan type, SaaSykit auto-create your product on the payment provider’s side (if supported by payment provider), then it will show the correct pricing model on the product component, checkout and on admin panel.

SaaSykit also offers a helper function that can help you report user usage as they consume their plans, which will automatically communicate with the correct payment provider and report the unit usage for you.

Laravel Herd adds Mongo DB support.

Need to work with MongoDB? You can easily set up MongoDB Community Edition right from the Service Management section in your Laravel Herd settings. By using the MongoDB PHP extension, you’ll get smooth, native MongoDB support, making it easy to develop, test, and scale your application with MongoDB during development. Whether you're handling complex data or exploring new use cases, this integration keeps your workflow streamlined and flexible.

New at SaaSykit

Good code is like a good conversation ... clear, concise, and easy to follow.

When it comes to reviewing Laravel code, this principle couldn't be more true. Code reviews aren't just about finding errors; they're about ensuring your project remains secure, scalable, and maintainable over time.

While preferences may vary among teams, there are proven best practices that lead to consistently better outcomes when it comes to code review. In this article, we'll dive into the key elements of an effective Laravel code review…

From the Community

Pagination is a common feature in web applications. Almost every Laravel application I've ever worked on has had some form of pagination implemented.

But what is pagination and why do we use it? How can we implement pagination in our Laravel applications? And how do we decide which pagination method to use?

In this article, we're going to answer those very questions and explore how to use pagination in Laravel for both Blade views and API endpoints. By the end of this article, you should feel confident enough to start using pagination in your own projects..

Laravel provides a robust CLI framework built on top of the popular Symfony Console component, which brings the best features of Laravel to the command line. While Laravel is traditionally used to create web applications, some applications need robust CLI commands that you can run via Docker in production environments.

If you are building a CLI-only project, you could also consider using the community project Laravel Zero. Everything we discuss in this article will work with Laravel or Laravel Zero (with a few tweaks to the Docker image).

The Laravel Unsplash package provides an easy way to integrate your Laravel project with the Unsplash API. Use the API to fetch photos, collections, and user data from Unsplash…

The bane of client side pagination stems from our retrieval of entire bulky data sets in one go. But, do we really need to get the entire data set all at once?

In this article, we’ll apply a combination of data allowance and accumulation strategies to remove this “all data at once” bottleneck and improve client side pagination. We’ll do so quickly and easily, with the help of Livewire!

When debugging errors, we as developers have a few tools available: an exception of a particular class, a message, a status code, and a stack trace. The stack trace is a report that provides information about the sequence of function calls that led to an error or an exception. It shows the order in which functions were called.

We name each call to a function/method within a stack trace a frame. It has lots of useful info like the file name, line number, function name, class (sometimes), and arguments that were used to make the call. Having arguments within a stack trace can be dangerous. For example, let's say you have a function like this…

In today's interconnected world, building robust and efficient APIs has become a crucial aspect of web development. Laravel, one of the most popular PHP frameworks, provides developers with a powerful toolkit for creating RESTful APIs. With its elegant syntax, extensive features, and active community, Laravel simplifies the process of designing and implementing APIs, allowing developers to focus on delivering high-quality services…

PHP 8.4 will be released on November 21, 2024. It'll include property hooks, HTML 5 support, as well as chaining methods on new without additional parentheses — a big one!

Encryption is a critical part of being secure online, and when it comes to securing our own apps, one of the forms of encryption we need to care about is HTTPS. You need an encrypted connection between your users browser and your app, to keep your users (and your app!) safe.

However, you can't simply install a certificate and call it a job done. (Ok, technically, installing certificates IS simple, Thanks Let's Encrypt!, but hopefully you get the point.) Instead, you need to add a few more layers of security, because browsers (still) like to default to unencrypted HTTP connections, and if you end up on a compromised Wi-Fi network, you may be downgraded to an unencrypted HTTP connection!

Blasp is a Laravel profanity filter package that helps detect and mask profane words. It provides profanity detection, substitution options, obfuscation, and more.

All about SaaS

Product launches in the social media era are fundamentally different
Social media has changed the way we launch products. Instead of a Big Bang Launch — a single spike of attention — we have Always Be Launching, the idea that what you need is nonstop/constant talk about your product, its capabilities, case studies, and achievements. You don’t “save up” info for announcements, you just go. This is the optimal strategy in world of abundance — an abundance is caused by infinite feeds, plentiful influencers, and a short news cycle that devours new content every hour.

Forget general-purpose copilots and chatbots. The next wave of AI will be built by those who can reimagine a specific industry vertical from the ground up. The potential of vertical AI represents a staggering $6 trillion opportunity in annual services spend in the U.S. alone—that's ten times greater than the $600 billion market cap of all cloud software combined.

Vertical AI can tackle previously intractable problems by addressing unstructured data, which makes up about 80% of all data and has been challenging for traditional SaaS to handle effectively.

One of the themes in Not Boring is that many of the most promising companies in the world are incredibly complex but worth trying to understand. Revv helps anyone understand and invest in even the most complex categories, like AI, space, robotics, and biotech.

With Revv, you can get a clear, concise view of any company’s business model and risk profile in seconds. Discover how a company makes money, how it compares on growth and profit, and why its revenue or margins may fluctuate—all in a single search. 

Every SaaS startup will think about adding a paid channel to their go-to-market strategy sooner or later. 

However, launching Google Ads for an early-stage B2B startup is a big deal. 

It requires taking a leap of faith and investing money in a channel that might seem like a black box. At the same time, it’s one of the best ways to accelerate customer acquisition, build brand awareness, and give you an edge over competitors. 

The single most important SaaS metric is retention, because cancellations indicate lack of Product/Market Fit, no matter the cause (price, features, severity of need, duration of need). If it cannot be fixed, it means the business is a failure even if other metrics are stellar, because it means customers are rejecting the product. Once you’re scaling (i.e. past Product/Market Fit and into tens of millions in revenue), you realize that cancellation scales exponentially with total customers—whereas new-customer growth scales linearly with sales and marketing costs—which means cancellation necessarily and always outgrows inbound activity, thus growth ceases. So, retention is most-important, regardless of stage.

90% of software engineers dream about having enough money to never work again. Some dream about founding a startup, and some about creating a small and profitable SaaS.

Only 1 in 1000 act on that dream and become indie hackers/founders. ~5% of them actually succeed. This makes Zero to Sold by Arvid Kahl a very rare and enjoyable success story! In 2017 together with his partner they created a simple SaaS for online English teachers, grew it to $55K monthly revenue, and sold it in 2019 for an undisclosed ‘life-changing sum’.

AI News

Artificial intelligence is the most consequential innovation we have seen in a generation, with the transformative power to address society’s most complex problems and create a whole new economy—much like what we saw with the advent of the printing press, electricity, and the internet.

It is a moment so big that it would be shortsighted for us to ignore the power of collaborating across the AI ecosystem—and the possibilities and potential that stand to be born from it. That is what brings us together—a shared understanding of what the stakes of this moment require and the role innovators big and small play in expanding opportunity and maintaining economic competitiveness. Our two firms believe that Little Tech and Big Tech can work successfully together, both to build a broader innovation ecosystem and collaborate on public policy initiatives.

We're introducing the analysis tool, a new built-in feature for Claude.ai that enables Claude to write and run JavaScript code. Claude can now process data, conduct analysis, and produce real-time insights. The analysis tool is available for all Claude.ai users in feature preview.

Think of the analysis tool as a built-in code sandbox, where Claude can do complex math, analyze data, and iterate on different ideas before sharing an answer. The ability to process information and run code means you get more accurate answers—building on Claude 3.5 Sonnet’s state-of-the-art coding and data skills.


Videos

How to Create Tech Videos for YouTube with Josh

React.js with Inertia in Laravel: Practical Example

Let's talk about Events and Listeners

4 Filament Tips From Code by... Spatie!

Corporate Career vs. Entrepreneurship

Keep building, keep rocking! 🤘

Psst, are you building a SaaS?

SaaSykit is a multi-tenancy Laravel-based boilerplate with everything you need to build an awesome SaaS.